0

I need to enable Watchdog functionality on my RPi.

I've followed this guide: https://medium.com/@arslion/enabling-watchdog-on-raspberry-pi-b7e574dcba6b

No errors were reported, I installed everything was needed.

However I don't need to reset when CPU usage is high, I only need to reset when the system really freezes.

Therefore, I've only

watchdog-device = /dev/watchdog
watchdog-timeout=15
realtime                = yes #was in by default
priority                = 1 #was in by default

In /etc/watchdog.conf.

When I check the service, it seems running:

# systemctl status watchdog
● watchdog.service - watchdog daemon
   Loaded: loaded (/lib/systemd/system/watchdog.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-04-05 19:17:24 CEST; 1h 28min ago

watchdog[674]: error retry time-out = 60 seconds
watchdog[674]: repair attempts = 1
watchdog[674]: alive=/dev/watchdog heartbeat=[none] to=root no_act=no force=no
watchdog[674]: watchdog now set to 15 seconds
watchdog[674]: hardware watchdog identity: Broadcom BCM2835 Watchdog timer

But as I don't have huge CPU usage trigger enabled, how can I make sure it's really active? Is it enough to have watchdog linux service to be enabled and active?

I tried to do echo 1 > /dev/watchdog, nothing printed out, but after 15 seconds, RPi rebooted.

Do I have to echo constantly? Or the service is doing exactly this job for me?

Daniel
  • 221
  • 2
  • 6
  • `but after 15 seconds, RPi rebooted` ... yes, watchdog is running – jsotola Apr 05 '21 at 23:43
  • You can use a ***time bomb*** to make sure: Rpi freezes every now and then, how to fix it with a watchdog? - Asked 1 year, 9 months ago, Viewed 4k times https://raspberrypi.stackexchange.com/questions/99584/rpi-freezes-every-now-and-then-how-to-fix-it-with-a-watchdog. Cheers. – tlfong01 Apr 06 '21 at 01:58
  • @jsotola: I know it's running in case I do `echo 1 > /dev/watchdog`. But is it also running if I don't do that? – Daniel Apr 06 '21 at 06:42
  • @Daniel then why is the title of your post asking if it is running .... anyway you have to "feed" the watchdog before the 15 seconds is up, otherwise the watchdig resets the RPi ... you cannot stop doing that – jsotola Apr 06 '21 at 12:59
  • If I DON'T do `echo 1 > /dev/watchdog` is it also running? Is `watchdog` service feeding it? Or it's just simply doesn't run, and I have to manually feed it? – Daniel Apr 07 '21 at 06:19

0 Answers0