wdd(8) Simple Watchdog Daemon wdd(8) NAME wdd - Simple Watchdog Daemon SYNOPSIS wdd [file]... DESCRIPTION Wdd is a simple daemon which periodically pings the watch­ dog attached to /dev/watchdog to keep it alive, and paral­ lely performs a series of system health checks to ensure everything is working correctly. If it detects an error, it exits so that the watchdog driver doesn't receive its keep-alives anymore and the system will quickly reboot. It is particularly targetted at remotely managed systems where accessibility is a prior concern. As a bonus, it's really tiny, it consumes between 12 and 20 kB of memory on x86. It can optionnally take a list of files in arguments. These files will be checked upon startup, and all those which are accessible will be periodically checked (one file per second) and the daemon will exit as soon as it cannot access any of them. This is particularly useful on /dev, /var, /tmp, /proc and more generally any remotely mounted file-system (including / in case of NFS root). As a special case, all files which are not accessible at startup are removed from the tests and get their first character rewritten with a '!' in the argument list, so that they become easily identifiable with ps. SYSTEM CHECKS System checks are performed in this order : - Opening of /dev/watchdog if it was not previously open ; - Allocation then release of 4 kB of memory to check that the VM subsystem is still operating, and to give the dae­ mon a chance to die under Out-of-Memory conditions (OOM) ; - Fork a child and wait for its immediate death. This ensures that the system still has free PIDs and some memory, can schedule, and can deliver signals. - File access on the next file in the argument list. Once the last one has been checked, the check loops back to the first one. If no argument was given, a test is performed on / to ensure that the VFS still works and that an wdd (flxutils) 0.1.23 August 2004 1 wdd(8) Simple Watchdog Daemon wdd(8) eventual NFS root is still accessible. - The daemon then pauses one second before starting the checks again. FILES /sbin/wdd The daemon itself EXAMPLES nice -n 10 /sbin/wdd Starts the daemon with a +10 renice value, and checks the accessibility of the root directory every second. Launching it with nice is recommended since it makes it more sensible to fork bombs because it soon will not get enough time slices to ping the driver. wdd / /dev/watchdog /proc/version /var/run /tmp/. Periodically checks all of these existing entries. This ensures that / is always reachable, that /dev has not been wiped out nor experienced a mount or unmount, that /proc is mounted, that /var is mounted and has not been wiped out, and that /tmp either is mounted or is a symbolic link to a valid directory. BUGS The daemon cannot renice itself, for this you need the 'nice' command. There's absolutely no output, neither debug nor error. SEE ALSO ______________________________ in the Linux kernel sources. AUTHORS Willy Tarreau wdd (flxutils) 0.1.23 August 2004 2