User Tools

Site Tools


general:linux:watchdog_with_systemd

http://0pointer.de/blog/projects/watchdog.html

To make use of the hardware watchdog it is sufficient to set the RuntimeWatchdogSec= option in /etc/systemd/system.conf. It defaults to 0 (i.e. no hardware watchdog use). Set it to a value like 20s and the watchdog is enabled. After 20s of no keep-alive pings the hardware will reset itself. Note that systemd will send a ping to the hardware at half the specified interval, i.e. every 10s. And that's already all there is to it. By enabling this single, simple option you have turned on supervision by the hardware of systemd and the kernel beneath it.[2]

On raspberry pi it may be needed to keep this below 16 seconds https://binerry.de/post/28263824530/raspberry-pi-watchdog-timer : Luckily the BCM2835 SoC has a hardware-based watchdog timer on board - but sadly there are no further informations about it in the actual datasheet. If i’m right informed this watchdog timeout register has 20 bits and counts down every 16µs (source: Raspberry PI BB), so the the hardware timer limit is something around 16 seconds (16*2^20µs) which seems to be right according to bcm2708_wdog module source.

I have been using 15s successfully on Raspberry Pi Model B Rev 1

general/linux/watchdog_with_systemd.txt · Last modified: 2020/11/17 19:46 by sunkan

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki