# Watchdog timers

## Amity88

I just trimmed down my kernel today and I was wondering how a watchdog timer is useful in a laptop. Microcontrollers I can understand, but laptops? why? could someone enlighten me on this

----------

## dE_logics

As far as I know, it's a userspace file provided by the kernel in /dev which if not interacted within each second, does something... (that I forgot).

----------

## eccerr0r

I'd imagine that the kernel config was generic enough to fit servers...and servers are basically like embedded devices, so to speak...

Perhaps too someone is using their laptop as a kiosk... maybe?

----------

## Carnildo

A watchdog card is a piece of hardware that, if the OS doesn't interact with it on a regular basis, power-cycles the computer.  It's useful on some types of servers and embedded systems, but doesn't have much point (and thus isn't present) on anything else.

----------

## Amity88

That's what I thought so too. I checked out my hardware here : http://kmuto.jp/debian/hcl/HP/nx7300 and apparently I have an intel TCO watchdog timer (808627b9) on my laptop. I enabled it's driver anyway, but I have no idea how it would be useful.   :Confused: 

----------

## Akkara

I don't know the details of your specific one.

But generally, there'll be a device called /dev/watchdog.  If left alone it won't do anything.  But if it is written to, it gets into a mode where it periodically expects to be written to again.  If too much time elapses without a write happening, it'll force a reboot, under the assumption that something had gone wrong.

This is normally used on something like a remote web server, where the process processing connections is expected to "ping" (by writing to) the watchdog periodically. If the write doesn't happen a reboot effectively starts the presumably crashed server.

See /usr/src/linux/Documentation/watchdog/* for more information.  Example code is in Documentation/watchdog/src/watchdog-simple.c

If this is what your laptop device is, I doubt you need it to use it.  (It might be involved in bios power management as well - I don't know - but something to check for.)

----------

## Amity88

Akkara,

Thanks for the info. I do have '/dev/watchdog'. I'll experiment with it, seems like it would be useful. I was checking some else's hardware the other day, and apparently inte ICH chipsets seem to have that particular wdt.

----------

