summaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2006-04-19 22:40:53 +0200
committerWim Van Sebroeck <wim@iguana.be>2006-06-20 18:50:42 +0200
commite05b59fe7927bc648ac3af3d59dc64a7ee6b22e2 (patch)
tree845497dc08f3d506edfc3af2956f43e3f6d70472 /Documentation/watchdog
parent427abfa28afedffadfca9dd8b067eb6d36bac53f (diff)
downloadlinux-stable-e05b59fe7927bc648ac3af3d59dc64a7ee6b22e2.tar.gz
linux-stable-e05b59fe7927bc648ac3af3d59dc64a7ee6b22e2.tar.bz2
linux-stable-e05b59fe7927bc648ac3af3d59dc64a7ee6b22e2.zip
[WATCHDOG] Pre-Timeout flags
Some watchdog timers support the concept of a "pretimeout" which occurs some time before the real timeout. The pretimeout can be delivered via an interrupt or NMI and can be used to panic the system when it occurs (so you get useful information instead of a blind reboot). Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/watchdog-api.txt30
1 files changed, 29 insertions, 1 deletions
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
index 21ed51173662..7dc2c1c6f779 100644
--- a/Documentation/watchdog/watchdog-api.txt
+++ b/Documentation/watchdog/watchdog-api.txt
@@ -110,7 +110,31 @@ current timeout using the GETTIMEOUT ioctl.
ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
printf("The timeout was is %d seconds\n", timeout);
-Envinronmental monitoring:
+Pretimeouts:
+
+Some watchdog timers can be set to have a trigger go off before the
+actual time they will reset the system. This can be done with an NMI,
+interrupt, or other mechanism. This allows Linux to record useful
+information (like panic information and kernel coredumps) before it
+resets.
+
+ pretimeout = 10;
+ ioctl(fd, WDIOC_SETPRETIMEOUT, &pretimeout);
+
+Note that the pretimeout is the number of seconds before the time
+when the timeout will go off. It is not the number of seconds until
+the pretimeout. So, for instance, if you set the timeout to 60 seconds
+and the pretimeout to 10 seconds, the pretimout will go of in 50
+seconds. Setting a pretimeout to zero disables it.
+
+There is also a get function for getting the pretimeout:
+
+ ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout);
+ printf("The pretimeout was is %d seconds\n", timeout);
+
+Not all watchdog drivers will support a pretimeout.
+
+Environmental monitoring:
All watchdog drivers are required return more information about the system,
some do temperature, fan and power level monitoring, some can tell you
@@ -169,6 +193,10 @@ The watchdog saw a keepalive ping since it was last queried.
WDIOF_SETTIMEOUT Can set/get the timeout
+The watchdog can do pretimeouts.
+
+ WDIOF_PRETIMEOUT Pretimeout (in seconds), get/set
+
For those drivers that return any bits set in the option field, the
GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current