当我们echo V > /dev/watchdog时,这意味着什么? 有一篇文章说可以防止意外停止看门狗。 我不清楚这个目的。
如果我跑得太久,我怎么能终止自己?
软锁的原因是什么?
如何在linuxembedded式中更改看门狗定时器
Linux软件看门狗
看门狗:设备或资源忙
根据内核文档,这被称为“魔术关闭”功能http://lxr.free-electrons.com/source/Documentation/watchdog/watchdog-api.txt
Magic Close feature: If a driver supports "Magic Close",the driver will not disable the watchdog unless a specific magic character 'V' has been sent to /dev/watchdog just before closing the file. If the userspace daemon closes the file without sending this special character,the driver will assume that the daemon (and userspace in general) died,and will stop pinging the watchdog without disabling it first. This will then cause a reboot if the watchdog is not re-opened in sufficient time.
这在Documentation/watchdog/watchdog-api.txt有文档记载(在某种程度上)。 不过,我认为这个文件自监督司机统一以来已经部分过时了。 将任何字符写入看门狗设备可以让看门狗知道系统是活着的。
如果没有进程写入/dev/watchdog ,则内核驱动程序不会ping硬件看门狗,系统将在看门狗超时后重新启动。 如果您想要进行一些维护,并且希望确保维护完成,即使需要很长时间,也不会冒重新开机的风险,则会出现此问题。 如果写入字符V ,则当写入进程关闭/dev/watchdog ,硬件看门狗将被禁用,并在/dev/watchdog重新打开时重新启用。 那么你可以做你想维护的时间。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。