]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/watchdog.4
This commit was generated by cvs2svn to compensate for changes in r156952,
[FreeBSD/FreeBSD.git] / share / man / man4 / watchdog.4
1 .\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org>
2 .\" Copyright (c) 2003, 2004 Sean M. Kelly <smkelly@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd June 25, 2003
29 .Dt WATCHDOG 4
30 .Os
31 .Sh NAME
32 .Nm watchdog
33 .Nd "hardware and software watchdog"
34 .Sh SYNOPSIS
35 .Cd "options CPU_ELAN"
36 .Cd "options CPU_GEODE"
37 .Cd "options SW_WATCHDOG"
38 .Pp
39 .In sys/watchdog.h
40 .Sh DESCRIPTION
41 The
42 .Nm
43 facility is used for controlling hardware and software watchdogs.
44 .Pp
45 The interface is through a device named
46 .Qq Li /dev/
47 .Dv _PATH_WATCHDOG
48 which responds to a single
49 .Xr ioctl 2
50 call,
51 .Dv WDIOCPATPAT .
52 .Pp
53 The call takes a single argument which represents a timeout value
54 specified as an integer power of two nanoseconds.
55 .Pp
56 The
57 .Dv WD_ACTIVE
58 flag signals that the
59 .Nm
60 will be kept from
61 timing out from userland, for instance by the
62 .Xr watchdogd 8
63 daemon.
64 .Pp
65 To disable the watchdogs, an argument of zero should be used.
66 .Pp
67 The
68 .Xr ioctl 2
69 call will return success if just one of the available
70 .Xr watchdog 9
71 implementations support the request.
72 If the call fails, for instance if none of
73 .Xr watchdog 9
74 implementations support the timeout
75 length, all watchdogs are disabled and must be explicitly re-enabled.
76 .Sh EXAMPLES
77 .\" XXX insert some descriptive text here
78 .Bd -literal -offset indent
79 u_int u = WD_ACTIVE | WD_TO_8SEC;
80 int fd = open("/dev/" _PATH_WATCHDOG, O_RDWR);
81
82 ioctl(fd, WDIOCPATPAT, &u);
83 .Ed
84 .Sh SEE ALSO
85 .Xr watchdogd 8 ,
86 .Xr watchdog 9
87 .Sh HISTORY
88 The
89 .Nm
90 code first appeared in
91 .Fx 5.1 .
92 .Sh AUTHORS
93 .An -nosplit
94 The
95 .Nm
96 facility was written by
97 .An Poul-Henning Kamp Aq phk@FreeBSD.org .
98 The software watchdog code
99 and this manual page were written by
100 .An Sean Kelly Aq smkelly@FreeBSD.org .
101 Some contributions were made by
102 .An Jeff Roberson Aq jeff@FreeBSD.org .