LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

watchdog

System health monitoring and reset daemon

TLDR

Start watchdog daemon
$ sudo systemctl start watchdog
copy
Enable at boot
$ sudo systemctl enable watchdog
copy
Test configuration
$ sudo watchdog -v
copy
Run in foreground
$ sudo watchdog -f
copy
Force test mode
$ sudo watchdog -F
copy

SYNOPSIS

watchdog [options]

DESCRIPTION

watchdog is a daemon that monitors system health and resets the system if problems are detected. It periodically writes to /dev/watchdog to prevent the kernel from triggering a hardware reset.The daemon can monitor various system conditions: load average, memory usage, file presence, process existence, temperature, and custom test scripts. If any check fails, the system reboots after logging the failure reason.Hardware watchdog support requires appropriate kernel modules (e.g., iTCO_wdt for Intel). Software watchdog via the softdog module provides fallback when hardware isn't available.

PARAMETERS

-f, --foreground

Run in foreground, don't fork.
-F, --force
Force test mode.
-v, --verbose
Verbose output.
-c file
Use specified configuration file.
-s, --sync
Sync before reboot.
--help
Display help.

CONFIGURATION

Config file: /etc/watchdog.confKey settings: watchdog-device, interval, max-load-1, min-memory, and test commands.

INSTALL

sudo apt install watchdog
copy
sudo dnf install watchdog
copy
sudo zypper install watchdog
copy
nix profile install nixpkgs#watchdog
copy

CAVEATS

Requires appropriate kernel watchdog driver. Improper configuration can cause unexpected reboots. Test thoroughly before production use. Software watchdog less reliable than hardware.

HISTORY

watchdog was developed for Linux systems requiring high availability without human intervention. The concept dates to embedded systems where hardware watchdog timers ensure recovery from system hangs. The Linux implementation combines hardware timer support with software monitoring.

SEE ALSO

dmesg(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid