watchdog.4 (370c3cb57cb5163d6847a6824b2720554e33754a) | watchdog.4 (4103b7652d1c438d04b360d0c81bae619b1b8259) |
---|---|
1 | 1.\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org> |
2.\" Copyright (c) 2003 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. --- 11 unchanged lines hidden (view full) --- 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 | 2.\" Copyright (c) 2003 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. --- 11 unchanged lines hidden (view full) --- 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 | 29.Dt watchdog 4 |
30.Os 31.Sh NAME 32.Nm watchdog | 30.Os 31.Sh NAME 32.Nm watchdog |
33.Nd Software watchdog | 33.Nd Hardware and Software watchdog |
34.Sh SYNOPSIS | 34.Sh SYNOPSIS |
35.Cd options WATCHDOG | 35.Cd options CPU_ELAN 36.Cd options CPU_GEODE 37.Cd options SW_WATCHDOG 38.Pp 39.In sys/watchdog.h 40.Bd -literal 41 42u_int u = WD_ACTIVE | WD_8SEC; 43int fd = open("/dev/" _PATH_WATCHDOG, O_RDWR); 44 45ioctl(fd, WDIOCPATPAT, &u); 46.Ed |
36.Sh DESCRIPTION 37.Nm | 47.Sh DESCRIPTION 48.Nm |
38is a set of checks and routines which allow the implementation of a software 39watchdog solution. | 49is a facility for controlling hardware and software watchdog facilities. |
40.Pp | 50.Pp |
41The user interface for 42.Nm 43is implemented via a trio of sysctl OIDs. 44When 45.Li debug.watchdog.enabled 46is set to a positive value, 47.Nm 48timeout checks are performed. 49In order to keep the watchdog from triggering, 50.Li debug.watchdog.reset 51must be accessed, 52by reading or writing, 53within every 54.Li debug.watchdog.timeout 55seconds. 56Failure to keep the 57.Nm 58updated will result in the kernel outputting interrupt counts, 59backtraces, 60and then attempting to enter 61.Xr ddb 9 . | 51The interface is through a device named "/dev/" _PATH_WATCHDOG which 52responds to a single ioctl call, WDIOCPATPAT. 53.Pp 54The ioctl call takes an argument which consists of a timeout value 55specified an integer power of two nanoseconds. 56.Pp 57In the flag WD_ACTIVE signals that the watchdog will be kept from 58timing out from userland, for instance by the 59.Xr watchdogd 8 60daemon. 61.Pp 62To disable the watchdogs, use an argument of zero. 63.Pp 64The ioctl call will return success if just one of the available 65watchdog implementations support the request. 66If the ioctl fails, for instance if no watchdog supports the timeout 67length, all watchdogs are disabled and must be explicitly reenabled. |
62.Sh SEE ALSO 63.Xr sysctl 8 , 64.Xr watchdogd 8 | 68.Sh SEE ALSO 69.Xr sysctl 8 , 70.Xr watchdogd 8 |
71.Xr watchdogd 9 |
|
65.Sh HISTORY 66The 67.Nm 68code first appeared in 69.Fx 5.1 . 70.Sh AUTHORS 71.An -nosplit 72The | 72.Sh HISTORY 73The 74.Nm 75code first appeared in 76.Fx 5.1 . 77.Sh AUTHORS 78.An -nosplit 79The |
73.Nm | 80.Nm watchdog 81facility were written by 82.An Poul-Henning Kamp Aq phk@FreeBSD.org . 83.Pp 84The 85.Nm SW_WATCHDOG |
74code and manual page were written by 75.An Sean Kelly Aq smkelly@FreeBSD.org . 76Some contributions were made by 77.An Jeff Roberson Aq jeff@FreeBSD.org . | 86code and manual page were written by 87.An Sean Kelly Aq smkelly@FreeBSD.org . 88Some contributions were made by 89.An Jeff Roberson Aq jeff@FreeBSD.org . |