1

I tried to configure the watchdog on several Pi's with the latest Raspbian by adding "dtpatam=watchdog=on" to /boot/config.txt and adding a file called /etc/watchdog.conf with:

watchdog-device = /dev/watchdog
watchdog-timeout = 15
max-load-1 = 24
interface = wlan0
min-memory      = 1
allocatable-memory  = 1

However this does not seem to work although messages like this from the watchdog daemon appear in /var/log/syslog:

May 17 00:29:43 doorbell watchdog[449]: device wlan0 did not receive anything since last check

I know that an alternative is to use /etc/systemd/system.conf but this does not have the same features, such as monitoring interfaces, files, memory levels, etc. However it does at least reset the Pi when the CPU load gets too high.

Is there a way to get watchdog.conf to actually reset the Pi when things go wrong?

WhyNine
  • 51
  • 8
  • This might help: Rpi freezes every now and then, how to fix it with a watchdog? Asked 2 years, 11 months ago Viewed 7k times https://raspberrypi.stackexchange.com/questions/99584/rpi-freezes-every-now-and-then-how-to-fix-it-with-a-watchdog/99587#99587 – tlfong01 May 18 '22 at 01:42
  • @tlfong01, yes I read that but it only uses systemd to control the watchdog and not the watchdog.conf file, so lacks the flexibility I am looking for. – WhyNine May 18 '22 at 08:48

1 Answers1

0

More information on max-load-1:

This option specifies the max average system load over the last 1 minute, above which the watchdog reboots the system. The system load is a measure of the amount of computational work that a system performs. The value is a floating-point number. For example, if set to 24 on a 24-core system, the watchdog will trigger a reboot if the 1-min load average exceeds 24, which essentially means all cores are fully utilized for the last minute. However, you typically want to set max-load-1 to the maximum possible value, because the system might occasionally reach full utilization under normal operation. Instead, you might want to set the max-load-1 to a value that indicates the system is overloaded.

For example, on a 4-core Raspberry Pi, you might set max-load-1 to 5 or 6. These values indicate that the system is overloaded, because the system load is higher than the number of cores.

Anyway, what I'm getting at is that setting max-load-1 to 24 on a Raspberry Pi might delay a reboot. For my Pi's, I've always started with a value of 6 and adjusted from there. I'd much rather have my Pi reboot as soon as possible to prevent it from cooking longer than it needs to.