The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/Documentation/watchdog.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1         Watchdog Timer Interfaces For The Linux Operating System
    2 
    3                 Alan Cox <alan@lxorguk.ukuu.org.uk>
    4 
    5              Custom Linux Driver And Program Development
    6 
    7 
    8 The following watchdog drivers are currently implemented:
    9 
   10         ICS     WDT501-P
   11         ICS     WDT501-P (no fan tachometer)
   12         ICS     WDT500-P
   13         Software Only
   14         SA1100 Internal Watchdog
   15         Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)
   16 
   17 
   18 All six interfaces provide /dev/watchdog, which when open must be written
   19 to within a timeout or the machine will reboot. Each write delays the reboot
   20 time another timeout. In the case of the software watchdog the ability to 
   21 reboot will depend on the state of the machines and interrupts. The hardware
   22 boards physically pull the machine down off their own onboard timers and
   23 will reboot from almost anything.
   24 
   25 A second temperature monitoring interface is available on the WDT501P cards
   26 and some Berkshire cards. This provides /dev/temperature. This is the machine 
   27 internal temperature in degrees Fahrenheit. Each read returns a single byte 
   28 giving the temperature.
   29 
   30 The third interface logs kernel messages on additional alert events.
   31 
   32 Both software and hardware watchdog drivers are available in the standard
   33 kernel. If you are using the software watchdog, you probably also want
   34 to use "panic=60" as a boot argument as well.
   35 
   36 The wdt card cannot be safely probed for. Instead you need to pass
   37 wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
   38 
   39 The SA1100 watchdog module can be configured with the "sa1100_margin"
   40 commandline argument which specifies timeout value in seconds.
   41 
   42 The i810 TCO watchdog modules can be configured with the "i810_margin"
   43 commandline argument which specifies the counter initial value. The counter
   44 is decremented every 0.6 seconds and default to 50 (30 seconds). Values can
   45 range between 3 and 63.
   46 
   47 The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
   48 WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
   49 and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
   50 documentation for the 82801AA and 82801AB datasheet). 
   51 
   52 Features
   53 --------
   54                 WDT501P         WDT500P         Software        Berkshire       i810 TCO        SA1100WD
   55 Reboot Timer       X               X                X               X               X               X
   56 External Reboot    X               X                o               o               o               X
   57 I/O Port Monitor   o               o                o               X               o               o
   58 Temperature        X               o                o               X               o               o
   59 Fan Speed          X               o                o               o               o               o
   60 Power Under        X               o                o               o               o               o
   61 Power Over         X               o                o               o               o               o
   62 Overheat           X               o                o               o               o               o
   63 
   64 The external event interfaces on the WDT boards are not currently supported.
   65 Minor numbers are however allocated for it.
   66 
   67 
   68 Example Watchdog Driver
   69 -----------------------
   70 
   71 #include <stdio.h>
   72 #include <unistd.h>
   73 #include <fcntl.h>
   74 
   75 int main(int argc, const char *argv[])
   76 {
   77         int fd=open("/dev/watchdog",O_WRONLY);
   78         if(fd==-1)
   79         {
   80                 perror("watchdog");
   81                 exit(1);
   82         }
   83         while(1)
   84         {
   85                 write(fd,"\0",1);
   86                 fsync(fd);
   87                 sleep(10);
   88         }
   89 }
   90 
   91 
   92 Contact Information
   93 
   94 People keep asking about the WDT watchdog timer hardware: The phone contacts
   95 for Industrial Computer Source are:
   96  
   97 Industrial Computer Source
   98 http://www.indcompsrc.com
   99 ICS Advent, San Diego
  100 6260 Sequence Dr.
  101 San Diego, CA 92121-4371
  102 Phone (858) 677-0877
  103 FAX: (858) 677-0895
  104 >
  105 ICS Advent Europe, UK
  106 Oving Road
  107 Chichester,
  108 West Sussex,
  109 PO19 4ET, UK
  110 Phone: 00.44.1243.533900
  111 
  112 
  113 and please mention Linux when enquiring.
  114 
  115 For full information about the PCWD cards see the pcwd-watchdog.txt document.

Cache object: 0e3319e7a343c87c5e8458195b20745a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.