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 June 25, 2003 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. 72.Pp 73One possible circumstance which will cause a watchdog timeout is an interrupt 74storm. 75If this occurs, 76.Nm 77will no longer execute and thus the kernel's watchdog routines will take 78action after a configurable timeout. 79.Pp 80Upon receiving the 81.Dv SIGTERM 82or 83.Dv SIGINT 84signals, 85.Nm 86will first instruct the kernel to no longer perform watchdog checks and then 87will terminate. 88.Pp 89The 90.Nm 91utility recognizes the following runtime options: 92.Bl -tag -width ".Fl I Ar file" 93.It Fl I Ar file 94Write the process ID of the 95.Nm 96utility in the specified file. 97.It Fl d 98Do not fork. 99When this option is specified, 100.Nm 101will not fork into the background at startup. 102.El 103.Sh FILES 104.Bl -tag -width ".Pa /var/run/watchdogd.pid" -compact 105.It Pa /var/run/watchdogd.pid 106.El 107.Sh SEE ALSO 108.Xr watchdog 4 , 109.Xr watchdog 8 , 110.Xr watchdog 9 111.Sh AUTHORS 112.An -nosplit 113The 114.Nm 115utility and manual page were written by 116.An Sean Kelly Aq smkelly@FreeBSD.org 117and 118.An Poul-Henning Kamp Aq phk@FreeBSD.org . 119.Pp 120Some contributions made by 121.An Jeff Roberson Aq jeff@FreeBSD.org . 122.Sh HISTORY 123The 124.Nm 125utility appeared in 126.Fx 5.1 . 127