3
FWA-2112 User Manual
C
ha
pte
r 1
Lin
ux
P
latf
orm
S
oft
w
are
G
uid
e I
ntr
od
uc
tio
n
1.2
Watchdog Function
There are two kinds of watchdogs on platform, and those could work separately. One
is PCH watchdog, the other is HWM, both could reset platform when watchdog is bit
-
ing. In this section, we will demonstrate watchdog functions on our platform.
1.2.1
Watchdog on PCH
PCH watchdog is supported by kernel’s driver module, wdat_wdt since kernel 4.9
and iTCO_wdt before kernel 4.9. The driver populates a dev file /dev/watchdog when
loading into kernel, and timeout is set as a parameter of this module. The watchdog
is triggered while dev file is touched or opened. Use ‘modinfo wdat_wdt’ (‘modinfo
iTCO_wdt’ for kernel before 4.9) to get more details about this module.
There is an open source software watchdog daemon to use watchdog easier. Watch
-
dog daemon manages kernel module and /dev/watchdog and keeps feeding it often
enough to keep the kernel from resetting. The configuration file is /etc/watchdog.conf
which contains feed interval and reset timeout options. The default reset timeout is
60 seconds, so platform will be reset if not feeding watchdog in 60 seconds.
Please refer to the following website for more information:
https://linux.die.net/man/8/watchdog
https://linux.die.net/man/5/watchdog.conf
Here is how to verify watchdog functionality. In this demonstration, the watchdog con
-
figuration file is configured in an abnormal way just for quick verification.
We will deliberately set our ‘interval’ longer than the ‘watchdog-timeout’ to force a
watchdog hardware reset. Please note that this hardware reset without graceful shut
-
down might damage file system, so please don’t do it in a service online system.
Please follow the steps below to perform the test.
1.
Install watchdog software.
2.
Make sure the driver is probed.
3.
Add a line to the file /etc/watchdog.conf.
4.
Make sure the watchdog device is not busy. The watchdog device will be occu
-
pied in some cases, user need to free the device first to perform the test. The
wd_identify is a simplified software watchdog daemon, it can get the identifica
-
tion string from the watchdog if it opens /dev/watchdog successfully.
If the command output is ‘device or resource busy’, use the following command to
free the watchdog device.
# yum install watchdog
# sudo modprobe wdat_wdt
# lsmod |grep wdat_wdt
wdat_wdt 13590 0
watchdog-device = /dev/watchdog
# sudo wd_identify
wdat_wdt
# pkill -9 watchdog