> 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 check the pidof crond from userspace does not help.
what we need is a simple tool like this:
watchdogger -d /dev/watchdog --timeout 90
watchdogger -d /dev/watchdog --kick
this does not run as a daemon, but will be called from a cron-script.
if crond is not running anymore ("oom_kill"), the device will reboot.
# just for saying it:
# the workaround this time is: (but badly spams our log)
/etc/init.d/watchdog stop
AND having a file which will be called from crond each minute:
#!/bin/sh
I=0
while [ $I -lt 60 ]; do
I=$(( $I + 5 ))
echo >/dev/watchdog
sleep 5
done
bye, Bastian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel