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. 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 September 2, 2006 29.Dt WATCHDOGD 8 30.Os 31.Sh NAME 32.Nm watchdogd 33.Nd watchdog daemon 34.Sh SYNOPSIS 35.Nm 36.Op Fl d 37.Op Fl e Ar cmd 38.Op Fl I Ar file 39.Op Fl s Ar sleep 40.Op Fl t Ar timeout 41.Sh DESCRIPTION 42The 43.Nm 44utility interfaces with the kernel's watchdog facility to ensure 45that the system is in a working state. 46If 47.Nm 48is unable to interface with the kernel over a specific timeout, 49the kernel will take actions to assist in debugging or restarting the computer. 50.Pp 51If 52.Fl e Ar cmd 53is specified, 54.Nm 55will attempt to execute this command with 56.Xr system 3 , 57and only if the command returns with a zero exit code will the 58watchdog be reset. 59If 60.Fl e Ar cmd 61is not specified, the daemon will perform a trivial file system 62check instead. 63.Pp 64The 65.Fl s Ar sleep 66argument can be used to control the sleep period between each execution 67of the check and defaults to one second. 68.Pp 69The 70.Fl t Ar timeout 71specifies the desired timeout period in seconds. 72The default timeout is 16 seconds. 73.Pp 74One possible circumstance which will cause a watchdog timeout is an interrupt 75storm. 76If this occurs, 77.Nm 78will no longer execute and thus the kernel's watchdog routines will take 79action after a configurable timeout. 80.Pp 81Upon receiving the 82.Dv SIGTERM 83or 84.Dv SIGINT 85signals, 86.Nm 87will first instruct the kernel to no longer perform watchdog checks and then 88will terminate. 89.Pp 90The 91.Nm 92utility recognizes the following runtime options: 93.Bl -tag -width ".Fl I Ar file" 94.It Fl I Ar file 95Write the process ID of the 96.Nm 97utility in the specified file. 98.It Fl d 99Do not fork. 100When this option is specified, 101.Nm 102will not fork into the background at startup. 103.El 104.Sh FILES 105.Bl -tag -width ".Pa /var/run/watchdogd.pid" -compact 106.It Pa /var/run/watchdogd.pid 107.El 108.Sh SEE ALSO 109.Xr watchdog 4 , 110.Xr watchdog 8 , 111.Xr watchdog 9 112.Sh HISTORY 113The 114.Nm 115utility appeared in 116.Fx 5.1 . 117.Sh AUTHORS 118.An -nosplit 119The 120.Nm 121utility and manual page were written by 122.An Sean Kelly Aq smkelly@FreeBSD.org 123and 124.An Poul-Henning Kamp Aq phk@FreeBSD.org . 125.Pp 126Some contributions made by 127.An Jeff Roberson Aq jeff@FreeBSD.org . 128