There are two parts of the Raspberry Pi's Watchdog system; the daemon and the hardware module.
First, load the watchdog module:
$ sudo modprobe bcm2708_wdog
(may have changed to bcm2835_wdt)
Then edit the /etc/modules file so that it restarts with the Pi:
$ sudo nano /etc/modules
Add the following line to the end:
bcm2708_wdog
(may have changed to bcm2835_wdt)
Install and configure the watchdog daemon to start on boot:
$ sudo apt-get install watchdog chkconfig
$ systemctl enable watchdog
$ systemctl start watchdog
Next configure watchdog:
$ sudo nano /etc/watchdog.conf
Uncomment the line #watchdog-device = /dev/watchdog
so it reads:
watchdog-device = /dev/watchdog
The watchdog daemon will send /dev/watchdog
a heartbeat every 10 seconds. If /dev/watchdog
does
not receive this signal it will restart your Raspberry Pi.
Testing:
Issue the following command (known as a "fork bomb") to lock up your system:
: (){ :|:& };: