I run ubuntu 14.04 LTS and watchdog 5.13. My goal is to achieve following:
- run external check script every 30 seconds
- reboot if script fails during 300 seconds (e.g. 10 failed attempts in a row)
I am having issues with the most basic watchdog configuration:
$ cat /etc/watchdog.conf
watchdog-device = /dev/watchdog
watchdog-timeout = 300
interval = 30
test-binary = /usr/local/sbin/watchdog_check.sh
realtime = yes
priority = 1
$ cat /etc/default/watchdog
run_watchdog=1
run_wd_keepalive=1
watchdog_module="none"
watchdog_options="-c /etc/watchdog.conf --verbose"
According to syslog,
watchdog-timeout
is being set to 254s (discussed here).- System reboots after first failure of
test-binary
.
Is it an expected behaviour or am I missing something?
P.S. At this moment I've implemented a 'wait until 10 failures' logic in my script itself.