WATCHDOGD(8) (smm)
WATCHDOGD(8) System Manager's Manual (smm) WATCHDOGD(8)

NAME

watchdogdAdvanced system & process monitor daemon

SYNOPSIS

watchdogd [-hnsVx] [-f FILE] [-l LEVEL] [-t SEC] [-T SEC] [/dev/watchdogN]

DESCRIPTION

watchdogd is an advanced system and process supervisor daemon, primarily intended for embedded Linux and server systems. It can monitor critical system resources, supervise the heartbeat of processes and record deadline transgressions, and initiate a controlled reset if needed.
When a system starts up, watchdogd determines the reset cause by querying the kernel. I case of system reset, and not power loss, the reset reason is available already in a file, stored by watchdogd before the reset. This reset reason can be then be used by an operator or network management system (NMS) to put the system in an operational safe state, or non-operational safe state.

WATCHDOG

A watchdog timer (WDT) is something most motherboards of laptops and servers today are equipped with. It is basically a small timer that is connected to the reset circuitry so that it can reset the board when the timer expires.
The Linux kernel provides a common userspace interface /dev/watchdog, created automatically when the appropriate driver module is loaded. If your board does not have a WDT the kernel provides a "softdog" module which could be good enough.
The idea is to have a watchdog daemon in userspace that runs in the background of your system. When there is no more CPU time for the watchdog daemon to run, it fails to "kick" the kernel WDT driver, which in turn causes the WDT to reboot the system.

OPTIONS

Earlier versions of watchdogd supported more command line options, from v3.0 watchdogd has been greatly simplified. Use watchdogctl(1) to query status and control watchdogd.
-f, --config FILE
Use FILE for daemon configuration. Default: /etc/watchdogd.conf
-h, --help
Show summary of command line options and exit.
-l, --loglevel LEVEL
Set log level: none, err, info, notice, debug.
-n, --foreground
Start in foreground, required when started by systemd or Finit, default is to daemonize and background.
-s, --syslog
Use syslog(3) for log messages, warnings and error conditions. This is the default when running in the background. When running in the foreground, see -n, log messages are printed to stdout.
-t, --interval SEC
WDT kick interval, in SEC seconds, default: 10
-T, --timeout SEC
HW watchdog timer (WDT) timeout, in SEC seconds.
-V, --version
Show program version and exit.
-x, --safe-exit
Disable HW watchdog (WDT) on orderly exit from watchdogd. Not supported in all WDT drivers due to HW limitations. Some drivers emulate support by keeping an in-kernel thread to continue kicking the WDT. Make sure to try it first, or verify the WDT driver source code.

SIGNALS

watchdogd responds to the following signals:
TERM
Safe exit if started with the -x flag, otherwise same as PWR.
INT
Same as TERM
PWR
Force a system reboot. Systems with Finit use this to reboot.
QUIT
Same as TERM
HUP
Reload configuration file
USR1
Ignored, was used in an earlier version.
USR2
Same as USR1

FILES

/etc/watchdogd.conf
Daemon configuration file. Read once when starting up and on SIGHUP or reload command from watchdogctl(1).
/var/lib/watchdogd.state
State pre boot, lists coming (re)boot reason. Do not rely on the contents of this file, it is used by watchdogd to maintain state across boots. If you want the status and reset reason, read /run/watchdogd.status instead.
/run/watchdogd.pid
For convenience to other processes when sending signals. Also a useful synchronization point, because the PID file is only created when watchdogd is ready to receive signals and register processes with the process supervisor API
/run/watchdogd.status
Current status, contains kernel WDT reset cause, watchdogd timeout and period, and the reset reason watchdogd determined from this boot.
/run/watchdogd.sock
UNIX domain socket used by libwdog and watchdogctl to connect to watchdogd

SEE ALSO

watchdogctl(1) watchdogd.conf(5)

AUTHORS

watchdogd is an improved version of the original, created by Michele d'Amico and adapted to uClinux-dist by Mike Frysinger. It is maintained by Joachim Wiberg at GitHub.
September 7, 2020 Debian