recommended watchdog usage

Ronny Nilsson rln-nard at arbetsmyra.dyndns.org
Thu Mar 19 08:58:37 CET 2015


Hi
The watchdog is already in use by the  /sbin/watchdog-simple  daemon. That's 
why you get the "Device or resource busy" error. You may of course use 
another daemon if you like, but I don't think you need to. You device is 
already protected by default. You can test this with the command:
	killall -KILL watchdog-simple
This should terminate the default watchdog daemon, causing the board to reboot 
in about 10 seconds. /sbin/watchdog-simple is actually a small script. The 
top of the file contains documentation for how to disable it, in the event 
should you want to replace it with a daemon of your own.

> This pi is going into a public art piece which has a 30 year
> lifespan.

Really? That's nice. Could you perhaps take a photo and show us? :)

/Ronny



-----------------------------------------------
> Thanks for the response Ronny.
>
> This pi is going into a public art piece which has a 30 year
> lifespan. It needs to be 
> robust to both OS weirdness as well as application hangs. It's fine if the
> whole pi reboots.
>
> It looks like all the plumbing is there to use the bcm2708_wdog:
>   - it's enabled in the kernel config
>   - it's listed in /etc/modules
>
> A couple of notable things
>   1. there is no /etc/watchdog.conf
>   2. most of the raspbian-centric howtos mention a watchdog daemon (ie.
> apt-get install watchdog chkconfig)
>
> re: #1, could be the problem, but I would expect it to run under default
> values. I'll investigate tonight. I just haven't had time to track down a
> template config file.
>
> re: #2, my understanding is the daemon just watches for OS issues.
>
> I think I should still be able to interact with the watchdog timer from my
> C code, thus protecting my app from crashes/freezes. I just get a "can't
> open '/dev/watchdog': Device or resource busy" when I try to use it.
>
> I'll keep investigating, but if anyone has any nuggets of wisdom I'm all
> ears.
>
> Thanks,
> James




More information about the Nard mailing list