Raspberry Pi: Enabling Watchdog on Raspbian Jessie

If you use a Raspberry Pi, one feature you may not be aware of is that it has a hardware watchdog.  When enabled and properly configured, if the system freezes up, the hardware watchdog will reset the system.  That’s pretty convenient if you’re putting a Raspberry Pi somewhere remote, like a tower site.  Here are instructions for enabling the watchdog on a Raspberry Pi 2 running Raspbian Jessie.

Install the watchdog package:

sudo apt-get install watchdog

 

Load the module manually:

sudo modprobe bcm2708_wdog

Then, add a config to automatically load the module:

# /etc/modules-load.d/bcm2708_wdog.conf
bcm2708_wdog

We’ll also need to manually edit the systemd unit at /lib/systemd/system/watchdog.service and add a line to the [Install] section:

[Install]
WantedBy=multi-user.target

Then enable the service:

systemctl enable watchdog.service

Finally, start the service:

systemctl start watchdog.service

You can set various options for the watchdog in /etc/watchdog.conf – see the man page for that file.

1/5 - (2 votes)

Related posts