wd 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .TH WD 3
  2. .SH NAME
  3. wd - hardware watchdog timer
  4. .SH SYNOPSIS
  5. .nf
  6. .B bind -a #w /dev
  7. .sp 0.3v
  8. .B /dev/wdctl
  9. .SH DESCRIPTION
  10. This device presents textual information about hardware watchdog timers
  11. on PCs and some other machines,
  12. and allows user-level control of them.
  13. When enabled, a watchdog timer counts to zero in a few seconds;
  14. upon reaching zero, it resets the machine with an NMI or equivalent.
  15. Some process must periodically restart the watchdog to avoid the NMI and
  16. keep the system alive;
  17. .IR watchdog (8)
  18. is one such program.
  19. .PP
  20. Reads from
  21. .I wdctl
  22. yield data of this form:
  23. .IP
  24. .EX
  25. enabled 3 restarts
  26. .EE
  27. .LP
  28. or
  29. .IP
  30. .EX
  31. disabled 3 restarts
  32. .EE
  33. .LP
  34. Control messages may be written to
  35. .I wdctl
  36. and include
  37. .LR enable ,
  38. .LR disable ,
  39. and
  40. .LR restart .
  41. .LP
  42. The watchdog is disabled at system shutdown, and when the last open
  43. file descriptor for
  44. .I wdctl
  45. is closed.
  46. .SH SOURCE
  47. .B /sys/src/9/port/devwd.c
  48. .br
  49. .B /sys/src/9/*/*watchdog.c
  50. .SH SEE ALSO
  51. .IR proc (3),
  52. .IR watchdog (8)
  53. .SH BUGS
  54. On PCs,
  55. to ensure consistent use of one CPU's timers,
  56. an
  57. .L enable
  58. message wires the issuing process
  59. (see
  60. .IR proc (3))
  61. to a CPU,
  62. and any subsequent control messages will
  63. wire the issuing processes to that same CPU.