-
Notifications
You must be signed in to change notification settings - Fork 41
Raspberry Pi Watchdog
A watchdog is usually a piece of hardware that has the ability to reset or power-cycle equipment that stops responding, in effect a Dead Man's Switch
. Using a watchdog needs two components:
- The hardware watchdog
- Software that sends the heartbeat signal
The watchdog hardware has an internal timer that will reset the system if it is allowed to reach the end. The software continually sends a heartbeat signal to indicate the system is still working. If the software ever stops sending the signal, or slows down enough, the watchdog will intervene.
Raspberry Pi (and almost all single board computers) have native watchdog capabilities.
Many PCs including NUCs also have watchdog capabilities. The instructions below should work on most systems.
As root, create /etc/systemd/system.conf.d
sudo mkdir /etc/systemd/system.conf.d
Create /etc/systemd/system.conf.d/watchdog.conf
sudo tee /etc/systemd/system.conf.d/watchdog.conf <<EOF
[Manager]
RuntimeWatchdogSec=10
ShutdownWatchdogSec=10min
EOF
Reboot!