wq4113 发表于 2012-05-15 20:28

请教linux看门狗

请问用什么命令在操作系统上关闭/dev/watchdog,谢了

Nice026 发表于 2012-06-14 11:30

回复 1# wq4113
楼主知道答案了吗?告知一下怎么弄的?

   

daniel_kohler 发表于 2012-06-14 12:56

回复 1# wq4113


The watchdog is automatically started once you open ‘/dev/watchdog’. To stop the watchdog, you will need to:

Write character ‘V’ into ‘/dev/watchdog’ to prevent stopping the watchdog accidentally
Close the ‘/dev/watchdog’ file

An exception on stopping the watchdog by closing the file is when ‘CONFIG_WATCHDOG_NOWAYOUT’ is enabled in your kernel configuration. When this option is enabled, the watchdog cannot be stopped at all. Hence, you will need to feed / kick it all the time or it will reset the system

daniel_kohler 发表于 2012-06-14 13:01

回复 2# Nice026


    The Linux kernel can reset the system if serious problems are detected. This can be implemented via special watchdog hardware, or via a slightly less reliable software-only watchdog inside the kernel. Either way, there needs to be a daemon that tells the kernel the system is working fine. If the daemon stops doing that, the system is reset.

watchdog is such a daemon. It opens /dev/watchdog, and keeps writing to it often enough to keep the kernel from resetting, at least once per minute. Each write delays the reboot time another minute. After a minute of inactivity the watchdog hardware will cause the reset. In the case of the software watchdog the ability to reboot will depend on the state of the machines and interrupts.

The watchdog daemon can be stopped without causing a reboot if the device /dev/watchdog is closed correctly, unless your kernel is compiled with the CONFIG_WATCHDOG_NOWAYOUT option enabled.

页: [1]
查看完整版本: 请教linux看门狗