On Wed, 28 Dec 2011 10:39:33 +0000 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 the watchdog-petting on, > so the device is running, but in fact lost. > > 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. What you could try is increasing the likeliness of the watchdog process to get killed on OOM. Setting /proc/WATCHDOGPID/oom_score_adj to 1000 will always kill the watchdog on any oom condition, as far as I can see. -- Greetings, Michael. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel