WD_KEEPALIVE(8)
π WD_KEEPALIVE(8) π
okay bestie, welcome to the System Manager's Manual section, page wd_keepalive(8) π this is the whole vibe, let's get into it β¨
π¦ NAME π¦
wd_keepalive β a simplified software watchdog daemon πΆ
πΈ SYNOPSIS πΈ
wd_keepalive [-c filename|--config-file filename]
β¨ DESCRIPTION β¨
So here's the tea β: this is a simplified version of the watchdog daemon. Unlike the full watchdog, this one runs no tests at all β it literally just exists to keep the hardware timer refreshed. That's it. That's the whole job. π
Typically you'd use it:
- at system start-up, to give protection before the services that the full version tests are actually running, and
- at shutdown, to keep the refresh going while those services are stopped.
If it's configured that way, it only opens /dev/watchdog and keeps writing to it often enough to keep the kernel from resetting β at least once per minute. Each write delays the reboot time another minute. After a minute of inactivity, the watchdog hardware will cause a reset. β° And in the case of the software watchdog, the ability to reboot will depend on the state of the machines and interrupts. (iykyk π)
The wd_keepalive daemon can be stopped without causing a reboot if the device /dev/watchdog is closed correctly β unless your kernel is compiled with the CONFIG_WATCHDOG_NOWAYOUT option enabled. π
Under high system load, wd_keepalive might get swapped out of memory and may fail to make it back in time. Under those circumstances the Linux kernel will reset the machine. π
To make sure you don't get unnecessary reboots, make sure you have the variable realtime set to yes in the configuration file watchdog.conf. That adds real time support to wd_keepalive: it will lock itself into memory, and there should be no problem even under the highest of loads. π«Ά
On a system running out of memory, the kernel will try to free enough memory by killing processes. The wd_keepalive daemon itself is exempted from this so-called out-of-memory killer. not me being the main character of memory management π
π OPTIONS π
Available command line options are the following, bestie:
-cconfig-file,--config-fileconfig-file β use config-file as the configuration file instead of the default/etc/watchdog.conf. π-Xnum,--loop-exitnum β run for num loops then exit as ifSIG_TERMwas received. Intended for test/debug (e.g. usingvalgrindfor checking memory access).
β οΈ If the daemon exits on a loop counter and you have the CONFIG_WATCHDOG_NOWAYOUT option compiled for the kernel or device-driver, then an unplanned reboot will follow β be warned! π¨ no cap, this one is for real.
π FILES π
/dev/watchdogβ the watchdog device. π/var/run/wd_keepalive.pidβ the pid file of the runningwd_keepalive. π
π SEE ALSO π
and that's the whole page, periodt π go forth and keep those timers refreshed, bestie, you got this π
sending you off with love from the 4th Berkeley Distribution, version dated June 2015 β mwah ππ bye bestie!! β¨
π¦ where this page comes from
- centos-stream 10: watchdog 5.16-11.el10 Β· GPL-2.0-or-later
- centos-stream 9: watchdog 5.16-2.el9 Β· GPLv2+
- debian bookworm: watchdog 5.16-1+b2
- debian trixie: watchdog 5.16-1.1
- fedora 43: watchdog 5.16-11.fc43 Β· GPL-2.0-or-later
- fedora 44: watchdog 5.16-11.fc43 Β· GPL-2.0-or-later
- nixos 26.05: watchdog 5.16
- nixpkgs unstable: watchdog 5.16
- opensuse-leap 16.0: watchdog 5.16-bp160.1.6 Β· GPL-2.0-only
- opensuse-leap 16.0: watchdog 5.16-bp160.1.6 Β· GPL-2.0-only
- opensuse-leap 16.0: watchdog 5.16-bp160.1.6 Β· GPL-2.0-only
- opensuse-leap 16.0: watchdog 5.16-bp160.1.6 Β· GPL-2.0-only
- ubuntu jammy: watchdog 5.16-1
- ubuntu noble: watchdog 5.16-1
- ubuntu questing: watchdog 5.16-1.1
- ubuntu resolute: watchdog 5.16-1.2
- ubuntu stonking: watchdog 5.16-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms