Created
July 18, 2018 16:47
-
-
Save hsiboy/1701eb7ea8e803b4521d097e3d7a43d1 to your computer and use it in GitHub Desktop.
Install watchdog service on raspberry pi - restart raspberry pi if x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install the service | |
| sudo modprobe bcm2708_wdog | |
| echo "bcm2708_wdog" | sudo tee -a /etc/modules | |
| sudo apt-get install watchdog | |
| sudo update-rc.d watchdog defaults | |
| # configure service | |
| sudo vi /etc/watchdog.conf | |
| # Uncomment the line that starts #watchdog-device to enable the watchdog daemon to use the watchdog device. | |
| # Uncomment the line that says #max-load-1 = 24 to reboot the device if the load > 24 for 1 minute. | |
| # A load of 25 of one minute means that you would have needed 25 Raspberry Pis to complete that task in 1 minute. | |
| # start the service | |
| sudo /etc/init.d/watchdog start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
N.b. either the
bcm2708_wdogis no longer in recent Linux releases, or its module depends on your HW arch, and/or the module is compiled as BUILTIN nowadays rather than an external driver module - I'm honestly not really sure which at this time.But in + summary, this works ouf of the box on a RPi 3b running Raspbian 12 (Bookworm):
UPDATE Alright, I think I got it working and the only thing I changed was, I uncommented/edited three lines in
/etc/systemd/system.confas below:WFM 🤷♂️