How to remove a message from watchdog when I close /dev/watchdog file

60 views Asked by At

I use a hardware watchdog to monitor an activity of some process and reboot the system in case the process is hanged.

While the system is executing init.d scripts a watchdog utility is running. Later, the process mentioned earlier is taking control over the watchdog so the watchdog utility have to be closed. At this moment I would like to not see any messages about watchdog in my log:

[   72.672542] watchdog: watchdog0: watchdog did not stop!

A watchdog which automatically stops when file is closed is not a real watchdog, so, of course the kernel is built with NOWAYOUT option on purpose.

2

There are 2 answers

3
Peter On BEST ANSWER

A direct and crude solution which I've found useful is to make a patch for drivers/watchdog/watchdog_dev.c file to remove the annoying line of code.

0
simone tolotti On

Please use:

echo "2" > /proc/sys/kernel/printk

Also removed others messages. To return default:

echo "7" > /proc/sys/kernel/printk

also see:

dmesg is not showing printk statement