Skip to content

Raspberry Pi Watchdog

Aaron W Morris edited this page Aug 28, 2023 · 6 revisions

Overview

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:

  1. The hardware watchdog
  2. 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 3 (and newer)

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!

Clone this wiki locally