Moxa V2616A-C8-CT-W7E [55/111] The watchdog device ioctl commands

Moxa V2616A-C5-CT-LX [55/111] The watchdog device ioctl commands
V2616A Linux Programming Guide
4-6
moxa@Moxa:~$ sudo insserv -v -d watchdog
[sudo] password for moxa:
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc0.d/K01watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc1.d/K01watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc2.d/S23watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc3.d/S23watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc4.d/S23watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc5.d/S23watchdog
insserv: enable service ../init.d/watchdog -> /etc/init.d/../rc6.d/K01watchdog
insserv: creating .depend.boot
insserv: creating .depend.start
insserv: creating .depend.stop
moxa@Moxa:~$
Check the run level.
moxa@Moxa:~$ ls -l /etc/rc?.d/*watchdog*
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc0.d/K01watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc1.d/K01watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc2.d/S23watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc3.d/S23watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc4.d/S23watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc5.d/S23watchdog -> ../init.d/watchdog
lrwxrwxrwx 1 root root 18 Nov 8 15:48 /etc/rc6.d/K01watchdog -> ../init.d/watchdog
moxa@Moxa:~$
The watchdog configure file is located in /etc/watchdog.conf. Currently we configure the watchdog daemon
to acknowledge the watchdog device in 60 seconds. The realtime is to lock itself into memory, so it is never
swapped out to prevent the delay of watchdog acknowledge. You can configure this file to enable the watchdog
as your system requirement.
watchdog-device = /dev/watchdog
interval = 60
realtime = yes
priority = -10
If you want to remove it from run-level, you can use this command:
moxa@Moxa:~# sudo insserv -r watchdog
Check the run level removement.
moxa@Moxa:~# ls -l /etc/rc?.d/*watchdog*
ls: cannot access /etc/rc?.d/*watchdog*: No such file or directory
moxa@Moxa:~#
The Watchdog Device IOCTL Commands
IOCTL WDIOC_GETSUPPORT
Description
This returns the support of the card itself
Input None
Output
(struct watchdog_info *) arg
Return On success, return 0. Otherwise, return < 0 value.
IOCTL WDIOC_GETSTATUS
Description
This returns the status of the card

Содержание

Похожие устройства

Скачать