Re: [OpenWrt-Devel] /dev/watchdog from shell script

2012-01-06 Thread Stefan Monnier
I did this on my boxes, but it does not help. Again a device is _pingable_, but all daemons are not responding anymore: So either: - watchdog was killed and this just disabled the watchdog timer altogether. - watchdog was not killed for some reason (e.g. because the kernel considered that it

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2012-01-05 Thread Bastian Bittorf
would'nt it be senseful to adjust START=01 to /etc/init.d/watchdog and place something like this? pid=$( pidof watchdog ) echo 1000 /proc/$pid/oom_score_adj yeah, could do this. I did this on my boxes, but it does not help. Again a device is _pingable_, but all daemons are not

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-29 Thread Michael Büsch
On Thu, 29 Dec 2011 06:52:18 + Bastian Bittorf bitt...@bluebottle.com wrote: A better way would be IMHO to use a cron.minutely which fire's an ioctl to /dev/watchdog. if crond is removed, the device should reboot. so i need a way to invoke an ioctl from shellscript. I

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-28 Thread Florian Fainelli
Hello Bastian, On 12/28/11 11:39, Bastian Bittorf wrote: hi devs, for having a better way not to lost a router i like to use /dev/watchdog from a shell script. the reason is this: Sometimes the oom-killer removes important tasks like ssh + httpd + routing + cron but leaves the

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-28 Thread Manuel Munz
On 28.12.2011 12:21, Florian Fainelli wrote: I do not think this will work better. If crond is not killed by the OOM killer, then the watchdog keeps being kept alive, and you end up in the same situation. Rather I think we need some kind of software monitoring by a daemon like upstart which

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-28 Thread Michael Büsch
On Wed, 28 Dec 2011 10:39:33 + Bastian Bittorf bitt...@bluebottle.com wrote: for having a better way not to lost a router i like to use /dev/watchdog from a shell script. the reason is this: Sometimes the oom-killer removes important tasks like ssh + httpd + routing + cron but leaves

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-28 Thread Bastian Bittorf
I think jow wrote something like this already, see: http://luci.subsignal.org/trac/browser/luci/trunk/contrib/package/freifunk-watchdog Interesting, but has the same design-issue like already mentioned: if the oom-killer is working it will likely kill the freifunk-watchdog and crond, so to

Re: [OpenWrt-Devel] /dev/watchdog from shell script

2011-12-28 Thread Bastian Bittorf
A better way would be IMHO to use a cron.minutely which fire's an ioctl to /dev/watchdog. if crond is removed, the device should reboot. so i need a way to invoke an ioctl from shellscript. I think this doesn't work. in our special case it would work, because all daemon-checking is done