为什么关闭watchdog.service后,会启动wd_keepalive.service

Debian Bug report logs - #768168
watchdog does not start at boot

Yes, indeed that is what we need. Watchdog triggers a special device to tell the hardware watchdog that everything is well. When it is stopped it closes the device and obviously stops triggering it. Normally that means the hardware watchdog is disabled.
However, there is a kernel setting called CONFIG_WATCHDOG_NOWAYOUT or somesuch that makes the kernel not accept the closing, meaning the hardware watchdog stays on alert and triggers a reset after a while.
With watchdog having to be stopped early (it could be monitoring other services) the system might run into a reset by the watchdog before its shutdown has been finished.
Therefore we need a small program doing nothing but triggering the device, which is wd_keepalive.

看门狗触发一个特殊的设备来告诉硬件看门狗一切正常。当看门狗停止时,它会关闭设备,而且很明显它会停止触发设备。通常这意味着硬件看门狗被禁用了。
但是,有一个内核设置称为CONFIG_WATCHDOG_NOWAYOUT或别的啥,使得内核不接受关闭。这意味着硬件看门狗会保持警戒并在一段时间后触发内核重启。
由于看门狗必须提前停止(它可能正在监视其他服务),系统就可能会在关闭完成之前被看门狗重启。
所以我们需要一个小程序用来触发设备,即wd_keepalive。

你可能感兴趣的:(linux,树莓派)