aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/watchdog-api.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
index 7dc2c1c6f779..d738ec25eaa4 100644
--- a/Documentation/watchdog/watchdog-api.txt
+++ b/Documentation/watchdog/watchdog-api.txt
@@ -134,6 +134,15 @@ There is also a get function for getting the pretimeout:
134 134
135Not all watchdog drivers will support a pretimeout. 135Not all watchdog drivers will support a pretimeout.
136 136
137Get the number of seconds before reboot:
138
139Some watchdog drivers have the ability to report the remaining time
140before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl
141that returns the number of seconds before reboot.
142
143 ioctl(fd, WDIOC_GETTIMELEFT, &timeleft);
144 printf("The timeout was is %d seconds\n", timeleft);
145
137Environmental monitoring: 146Environmental monitoring:
138 147
139All watchdog drivers are required return more information about the system, 148All watchdog drivers are required return more information about the system,