pcwd-watchdog.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ===================================
  2. Berkshire Products PC Watchdog Card
  3. ===================================
  4. Last reviewed: 10/05/2007
  5. Support for ISA Cards Revision A and C
  6. =======================================
  7. Documentation and Driver by Ken Hollis <kenji@bitgate.com>
  8. The PC Watchdog is a card that offers the same type of functionality that
  9. the WDT card does, only it doesn't require an IRQ to run. Furthermore,
  10. the Revision C card allows you to monitor any IO Port to automatically
  11. trigger the card into being reset. This way you can make the card
  12. monitor hard drive status, or anything else you need.
  13. The Watchdog Driver has one basic role: to talk to the card and send
  14. signals to it so it doesn't reset your computer ... at least during
  15. normal operation.
  16. The Watchdog Driver will automatically find your watchdog card, and will
  17. attach a running driver for use with that card. After the watchdog
  18. drivers have initialized, you can then talk to the card using a PC
  19. Watchdog program.
  20. I suggest putting a "watchdog -d" before the beginning of an fsck, and
  21. a "watchdog -e -t 1" immediately after the end of an fsck. (Remember
  22. to run the program with an "&" to run it in the background!)
  23. If you want to write a program to be compatible with the PC Watchdog
  24. driver, simply use of modify the watchdog test program:
  25. tools/testing/selftests/watchdog/watchdog-test.c
  26. Other IOCTL functions include:
  27. WDIOC_GETSUPPORT
  28. This returns the support of the card itself. This
  29. returns in structure "PCWDS" which returns:
  30. options = WDIOS_TEMPPANIC
  31. (This card supports temperature)
  32. firmware_version = xxxx
  33. (Firmware version of the card)
  34. WDIOC_GETSTATUS
  35. This returns the status of the card, with the bits of
  36. WDIOF_* bitwise-anded into the value. (The comments
  37. are in linux/pcwd.h)
  38. WDIOC_GETBOOTSTATUS
  39. This returns the status of the card that was reported
  40. at bootup.
  41. WDIOC_GETTEMP
  42. This returns the temperature of the card. (You can also
  43. read /dev/watchdog, which gives a temperature update
  44. every second.)
  45. WDIOC_SETOPTIONS
  46. This lets you set the options of the card. You can either
  47. enable or disable the card this way.
  48. WDIOC_KEEPALIVE
  49. This pings the card to tell it not to reset your computer.
  50. And that's all she wrote!
  51. -- Ken Hollis
  52. (kenji@bitgate.com)