大网数据广告活动
服务器运维问答

Systemd shutdown timer not working

· 52CE 我爱测

From the systemd manual :- ShutdownWatchdogSec= ShutdownWatchdogSec= may be used to configure the hardware watchdog when the system is asked to reboot. It works as a safety net to ensure that the reboot takes place even if a clea…

问题原文

原帖链接 · Bug Killer · CC BY-SA 3.0

From the systemd manual:-

ShutdownWatchdogSec=

ShutdownWatchdogSec= may be used to configure the hardware watchdog when the system is asked to reboot. 
It works as a safety net to ensure that the reboot takes place even if a clean reboot attempt times out.
By default RuntimeWatchdogSec= defaults to 0 (off), and ShutdownWatchdogSec= to 10min.
These settings have no effect if a hardware watchdog is not available.

Currently, there is an issue with shutting down my system wherein the kernel keeps printing the message "unregister_netdevice: waiting for to get free:Instance count=1" even 10 minutes after issuing reboot command. I don't know what could be causing this issue, but I was hoping ShutdownWatchdogSec would force reboot in this and other scenarios.

However the system doesn't shut down within the stipulated time. It still takes 10+min. I have made the required change in my /etc/systemd/system.conf:

ShutdownWatchdogSec=4min

Watchdog seems to be present on my system

root@bugkiller:~# dmesg|grep watchdog

[    0.044094] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    4.051861] systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
[    4.051874] systemd[1]: Set hardware watchdog to 1min 4s.

root@re0:~# uname -a

Linux re0 4.1.15-foo-00929-g15aa5b3 #1 SMP PREEMPT Mon Oct 3 18:01:53 PDT 2016 x86_64 GNU/Linux

root@re0:~# systemctl --version

systemd 219
+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN

已采纳解答

原帖链接 · Bug Killer · CC BY-SA 3.0

This worked when I compiled the kernel with the option CONFIG_WATCHDOG_NOWAYOUT. Without this setting, the kernel disables the watchdog when the daemon is stopped.

Also, the error unregister_netdevice went away when I upgraded to 4.4 kernel

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。