OpenWrt Forum Archive

Topic: Using watchdog timers

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I searched but did not find much relevant discussion of watchdog usage.  I have been using the AR7 port on my DSL-G604t (without wireless) and have seen eventual hangs after a few days of uptime.  So, I thought I should try to make use of the hardware watchdog that is reported (as disabled) in the dmesg output...

I made sure the watchdog applet in busybox was enabled in my image, and then I manually ran "watchdog /dev/watchdog" and it seems happy, reporting that the watchdog was reenabled and putting a watchdog process into the background.  I still await the first hang/crash to see if it actually reboots itself automatically now.  If it works, I will worry about integrating this into the boot somehow.

I am surprised that there isn't a lot of interest on the list and a built-in feature to support the use of the watchdog in the standard images, e.g. in the configuration and boot process... It makes me wonder whether there are known problems with this, or whether most devices do not have hardware watchdogs?

The one thing that seems a little tricky is determining the right watchdog frequency to use, as the busybox applet help is not clear on whether it sets the watchdog grace period or not.  It said it defaults to 30 second updates, and I saw that the hardware driver reported a 60 second grace period, so I figured the default was OK in my situation.  Ideally, I imagine you would want to configure both the grace period and update rates for the right level of response time for your needs, but I haven't really much experience with these watchdog timers...

have you succeed with this?
I am using DG834 ar7 and i eventually get hangs  too.
How is it working ?

For OpenWRT, watchdog functionality will be provided by procd, from the Barrier Breaker (current trunk) release. See http://wiki.openwrt.org/doc/techref/procd

(Last edited by Flint on 9 Aug 2013, 21:44)

The discussion might have continued from here.