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 watchdog-petting on,
so the device is running, but in fact lost.

Once started the watchdog daemon does not longer allocate big chunks of memory (if any at all), so this is kind of expected.


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.

whats the best way, maybe with onboard-tools?

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 makes sures essential software is restarted once killed.
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to