xref: /plan9/sys/man/3/wd (revision 606e0002a90a0d9bce9afcd5c5e8488c3073a8c8)
WD 3
NAME
wd - hardware watchdog timer
SYNOPSIS
 bind -a #w /dev  /dev/wdctl 
DESCRIPTION
This device presents textual information about hardware watchdog timers on PCs and some other machines, and allows user-level control of them. When enabled, a watchdog timer counts to zero in a few seconds; upon reaching zero, it resets the machine with an NMI or equivalent. Some process must periodically restart the watchdog to avoid the NMI and keep the system alive; watchdog (8) is one such program.

Reads from wdctl yield data of this form:

.EX enabled 3 restarts

or

.EX disabled 3 restarts

Control messages may be written to wdctl and include .LR enable , .LR disable , and .LR restart .

The watchdog is disabled at system shutdown, and when the last open file descriptor for wdctl is closed.

SOURCE
/sys/src/9/port/devwd.c

/sys/src/9/*/*watchdog.c

SEE ALSO
proc (3), watchdog (8)
BUGS
On PCs, to ensure consistent use of one CPU's timers, an .L enable message wires the issuing process (see proc (3)) to a CPU, and any subsequent control messages will wire the issuing processes to that same CPU.