📄 watchdog.txt
字号:
Watchdog Timer Interfaces For The Linux Operating System Alan Cox <alan@lxorguk.ukuu.org.uk> Custom Linux Driver And Program DevelopmentThe following watchdog drivers are currently implemented: ICS WDT501-P ICS WDT501-P (no fan tachometer) ICS WDT500-P Software Only SA1100 Internal Watchdog Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)All six interfaces provide /dev/watchdog, which when open must be writtento within a timeout or the machine will reboot. Each write delays the reboottime another timeout. In the case of the software watchdog the ability to reboot will depend on the state of the machines and interrupts. The hardwareboards physically pull the machine down off their own onboard timers andwill reboot from almost anything.A second temperature monitoring interface is available on the WDT501P cardsand some Berkshire cards. This provides /dev/temperature. This is the machine internal temperature in degrees Fahrenheit. Each read returns a single byte giving the temperature.The third interface logs kernel messages on additional alert events.Both software and hardware watchdog drivers are available in the standardkernel. If you are using the software watchdog, you probably also wantto use "panic=60" as a boot argument as well.The wdt card cannot be safely probed for. Instead you need to passwdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".The SA1100 watchdog module can be configured with the "sa1100_margin"commandline argument which specifies timeout value in seconds.The i810 TCO watchdog modules can be configured with the "i810_margin"commandline argument which specifies the counter initial value. The counteris decremented every 0.6 seconds and default to 50 (30 seconds). Values canrange between 3 and 63.The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS andWDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter valueand WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel'sdocumentation for the 82801AA and 82801AB datasheet). Features-------- WDT501P WDT500P Software Berkshire i810 TCO SA1100WDReboot Timer X X X X X XExternal Reboot X X o o o XI/O Port Monitor o o o X o oTemperature X o o X o oFan Speed X o o o o oPower Under X o o o o oPower Over X o o o o oOverheat X o o o o oThe external event interfaces on the WDT boards are not currently supported.Minor numbers are however allocated for it.Example Watchdog Driver-----------------------#include <stdio.h>#include <unistd.h>#include <fcntl.h>int main(int argc, const char *argv[]){ int fd=open("/dev/watchdog",O_WRONLY); if(fd==-1) { perror("watchdog"); exit(1); } while(1) { write(fd,"\0",1); fsync(fd); sleep(10); }}Contact InformationPeople keep asking about the WDT watchdog timer hardware: The phone contactsfor Industrial Computer Source are: Industrial Computer Sourcehttp://www.indcompsrc.comICS Advent, San Diego6260 Sequence Dr.San Diego, CA 92121-4371Phone (858) 677-0877FAX: (858) 677-0895>ICS Advent Europe, UKOving RoadChichester,West Sussex,PO19 4ET, UKPhone: 00.44.1243.533900and please mention Linux when enquiring.For full information about the PCWD cards see the pcwd-watchdog.txt document.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -