diff options
author | phk <phk@FreeBSD.org> | 2004-02-28 20:56:35 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-02-28 20:56:35 +0000 |
commit | 1ea4f5b08eb4973891b58c77d4bc90181d5e22bd (patch) | |
tree | f501264822e55dec659458e1357da5e001910c38 /share/man/man4/watchdog.4 | |
parent | 993f5fc4042e0eeb6a00cb4aba3fe131dd8e9872 (diff) | |
download | FreeBSD-src-1ea4f5b08eb4973891b58c77d4bc90181d5e22bd.zip FreeBSD-src-1ea4f5b08eb4973891b58c77d4bc90181d5e22bd.tar.gz |
Rename the WATCHDOG option to SW_WATCHDOG and make it use the
generic watchdoc(9) interface.
Make watchdogd(8) perform as watchdog(8) as well, and make it
possible to specify a check command to run, timeout and sleep
periods.
Update watchdog(4) to talk about the generic interface and add
new watchdog(8) page.
Diffstat (limited to 'share/man/man4/watchdog.4')
-rw-r--r-- | share/man/man4/watchdog.4 | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4 index b00ccda..03af444 100644 --- a/share/man/man4/watchdog.4 +++ b/share/man/man4/watchdog.4 @@ -1,4 +1,4 @@ - +.\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org> .\" Copyright (c) 2003 Sean M. Kelly <smkelly@FreeBSD.org> .\" All rights reserved. .\" @@ -26,42 +26,49 @@ .\" $FreeBSD$ .\" .Dd June 25, 2003 -.Dt WATCHDOG 4 +.Dt watchdog 4 .Os .Sh NAME .Nm watchdog -.Nd Software watchdog +.Nd Hardware and Software watchdog .Sh SYNOPSIS -.Cd options WATCHDOG +.Cd options CPU_ELAN +.Cd options CPU_GEODE +.Cd options SW_WATCHDOG +.Pp +.In sys/watchdog.h +.Bd -literal + +u_int u = WD_ACTIVE | WD_8SEC; +int fd = open("/dev/" _PATH_WATCHDOG, O_RDWR); + +ioctl(fd, WDIOCPATPAT, &u); +.Ed .Sh DESCRIPTION .Nm -is a set of checks and routines which allow the implementation of a software -watchdog solution. +is a facility for controlling hardware and software watchdog facilities. .Pp -The user interface for -.Nm -is implemented via a trio of sysctl OIDs. -When -.Li debug.watchdog.enabled -is set to a positive value, -.Nm -timeout checks are performed. -In order to keep the watchdog from triggering, -.Li debug.watchdog.reset -must be accessed, -by reading or writing, -within every -.Li debug.watchdog.timeout -seconds. -Failure to keep the -.Nm -updated will result in the kernel outputting interrupt counts, -backtraces, -and then attempting to enter -.Xr ddb 9 . +The interface is through a device named "/dev/" _PATH_WATCHDOG which +responds to a single ioctl call, WDIOCPATPAT. +.Pp +The ioctl call takes an argument which consists of a timeout value +specified an integer power of two nanoseconds. +.Pp +In the flag WD_ACTIVE signals that the watchdog will be kept from +timing out from userland, for instance by the +.Xr watchdogd 8 +daemon. +.Pp +To disable the watchdogs, use an argument of zero. +.Pp +The ioctl call will return success if just one of the available +watchdog implementations support the request. +If the ioctl fails, for instance if no watchdog supports the timeout +length, all watchdogs are disabled and must be explicitly reenabled. .Sh SEE ALSO .Xr sysctl 8 , .Xr watchdogd 8 +.Xr watchdogd 9 .Sh HISTORY The .Nm @@ -70,7 +77,12 @@ code first appeared in .Sh AUTHORS .An -nosplit The -.Nm +.Nm watchdog +facility were written by +.An Poul-Henning Kamp Aq phk@FreeBSD.org . +.Pp +The +.Nm SW_WATCHDOG code and manual page were written by .An Sean Kelly Aq smkelly@FreeBSD.org . Some contributions were made by |