> > 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 via cron. so if cron fails everything is not working anymore. > 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. Thats seems like an interesting idea. As far i can read oom_kill.c this will add 100% to the oom_badness() of the watchdog-kicker, but the value is calculated based on memory-consumption. IMHO this is not enough, because even our mini-cron consumes more memory then the watchdog-kicker. Is there a switch: "kill this pid at first"? https://github.com/mirrors/linux/blob/master/mm/oom_kill.c beside that: 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 (it would'nt make sense on a desktop-system, but on a router...) bye, Bastian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel