我最近买了一块 SuperMicro X10SLL-F 主板,它内置了 BMC(Aspeed AST2400 芯片)。我想在服务器上运行 linux 时使用内置的看门狗控制器(gentoo hardened)。
我在 bios 中启用了看门狗功能,然后将主板跳线从硬复位切换到 NMI(看门狗超时操作,用于测试目的以避免重新启动)。关于软——我安装并添加到默认的运行级别看门狗程序 (sys-apps/watchdog),该程序被配置为每 10 秒 ping 看门狗设备(/dev/watchdog,存在)。看门狗超时设置为 250 秒。
程序显然可以看到看门狗硬件(启用了 openipmi 的 ipmitool):
# ipmitool mc watchdog get
Watchdog Timer Use: SMS/OS (0x44)
Watchdog Timer Is: Started/Running
Watchdog Timer Actions: Hard Reset (0x01)
Pre-timeout interval: 0 seconds
Timer Expiration Flags: 0x10
Initial Countdown: 254 sec
Present Countdown: 253 sec
Run Code Online (Sandbox Code Playgroud)
免费ipmi:
# bmc-watchdog --get
Timer Use: SMS/OS
Timer: Running
Logging: Enabled
Timeout Action: Hard Reset
Pre-Timeout Interrupt: None
Pre-Timeout …Run Code Online (Sandbox Code Playgroud) 我已经在 Google 上搜索了一段时间,但我还没有找到有关如何将我的 6300esb 看门狗计时器的内核驱动程序连接到 /dev/watchdog 并确保看门狗守护程序使其保持活动状态的正确文档。
顺便说一下,我在 KVM 虚拟机中使用了 RHEL 兼容的 Scientific Linux 6.3
以下是我迄今为止尝试过的所有内容:
dmesg|grep 6300
i6300ESB timer: Intel 6300ESB WatchDog Timer Driver v0.04
i6300ESB timer: initialized (0xffffc900008b8000). heartbeat=30 sec (nowayout=0)
Run Code Online (Sandbox Code Playgroud)
|
ll /dev/watchdog
crw-rw----. 1 root root 10, 130 Sep 22 22:25 /dev/watchdog
Run Code Online (Sandbox Code Playgroud)
|
/etc/watchdog.conf
#ping = 172.31.14.1
#ping = 172.26.1.255
#interface = eth0
file = /var/log/messages
#change = 1407
# Uncomment to enable test. Setting one of these values to '0' disables it.
# These values …Run Code Online (Sandbox Code Playgroud) 我以低成本托管服务租用了一台专用服务器(带有 Intel Haswell CPU 和定制硬件),并将其与 CentOS 6.4 / 64 位 Linux(带有库存内核:2.6.32-358.14.1.el6.x86_64)一起使用。
每隔几周它就会挂起,其他客户似乎也有类似的问题。
在dmesg我看到的输出中(这里是完整的 dmesg 输出):
CPU0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping 03
....
NMI watchdog enabled, takes one hw-pmu counter.
....
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.07rh
iTCO_wdt: Found a Lynx Point TCO device (Version=2, TCOBASE=0x1860)
iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
Run Code Online (Sandbox Code Playgroud)
在进程列表中,我看到:
# ps uawwwx|grep [w]atchdog
root 6 0.0 0.0 0 0 ? S Aug22 0:00 [watchdog/0]
root 10 0.0 0.0 …Run Code Online (Sandbox Code Playgroud) 有没有人写过一个自我看门狗脚本并且可以分享它的解决方式?我在其中一台路由器上安装了 DD-WRT,并且只能制作一个启动脚本。问题是跑不起来。如果我通过 telnet 登录并手动启动它,效果很好。所以我需要添加一个 cron 规则来运行它,但不能多次运行。我正在考虑使用:
if [`ps | grep [c]ustom.sh` -gt 1]; then
exit;
else
...
fi
Run Code Online (Sandbox Code Playgroud)
你知道有什么其他方法可以做到这一点吗?