Moxa V2403-C3-W-T [53/90] How the wdt works

Moxa V2403-C7-W-T [53/90] How the wdt works
V2403 Series Linux Software Programmer’s Guide
4-6
Magic close
If NO WAY OUT is disabled, you can stop the timer using magic close. Use the following commands to do this:
root@Moxa:~$ echo V > /dev/watchdog
root@Moxa:~$
How the WDT Works
The Debian project supports a watchdog daemon. The watchdog daemon checks if your system is still working.
If programs are no longer executing, it will perform a hard reset of the system. The standard watchdog driver
and package have been installed in the V2403. If you need to run the watchdog once the system boots up, you
can use insserv to enable the watchdog function.
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 configuration 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 needed by your application.
watchdog-device = /dev/watchdog
interval = 60
realtime = yes
priority = -10

Содержание

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

Скачать