Watchdog timer in brief

A watchdog is a mechanism which is used to periodically detect that the system is in a healthy state, and, if it is deemed not to be, to reboot it. This is achieved by setting up a (kernel) timer (to say, a 60 second timeout). If all's well, a watchdog daemon process (a daemon is nothing but a system background process) will consistently cancel the timer (before it expires, of course) and subsequently re-enable it; this is known as petting the dog. If the daemon does not (due to something having gone badly wrong), the watchdog is annoyed and reboots the system! A pure software watchdog implementation will not be protected against kernel bugs and faults; a hardware watchdog (which latches into the board reset circuitry) ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.