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:

  • -c config-file, --config-file config-file β€” use config-file as the configuration file instead of the default /etc/watchdog.conf. πŸŽ€
  • -X num, --loop-exit num β€” run for num loops then exit as if SIG_TERM was received. Intended for test/debug (e.g. using valgrind for 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 running wd_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!! ✨