xref: /netbsd/sbin/wdogctl/wdogctl.8 (revision bf9ec67e)
1.\"	$NetBSD: wdogctl.8,v 1.4 2001/11/16 11:27:09 wiz Exp $
2.\"
3.\" Copyright (c) 2000 Zembu Labs, Inc.
4.\" All rights reserved.
5.\"
6.\" Author: Jason R. Thorpe <thorpej@zembu.com>
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software
17.\"    must display the following acknowledgement:
18.\"	This product includes software developed by Zembu Labs, Inc.
19.\" 4. Neither the name of Zembu Labs nor the names of its employees may
20.\"    be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
24.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
25.\" RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
26.\" CLAIMED.  IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
27.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33.\"
34.Dd October 19, 2000
35.Dt WDOGCTL 8
36.Os
37.Sh NAME
38.Nm wdogctl
39.Nd Watchdog timer control utility
40.Sh SYNOPSIS
41.Nm
42.Nm ""
43.Fl k
44.Op Fl A
45.Op Fl p Ar seconds
46.Ar timer
47.Nm ""
48.Fl u
49.Op Fl A
50.Op Fl p Ar seconds
51.Ar timer
52.Nm ""
53.Fl d
54.Sh DESCRIPTION
55.Nm
56is used to manipulate watchdog timers.  Watchdog timers provide a
57means of ensuring that a system continues to make progress.  This
58is accomplished by use of a timer, provided by either hardware or
59software; when the timer expires, the watchdog resets the system.
60In this case of a hardware watchdog timer, this is accomplished by
61asserting the system's hardware reset signal.  In the case of a
62software watchdog timer, this is accomplished by calling the kernel's
63normal reboot path.  In order to prevent the system from rebooting,
64something must refresh the timer to prevent it from expiring.
65.Pp
66The
67.Nx
68kernel provides two basic modes in which watchdog timers may
69operate: kernel tickle mode and user tickle mode.  In kernel
70tickle mode, a timer in the kernel refreshes the watchdog timer.
71In user tickle mode,
72.Nm
73runs in the background and refreshes the watchdog timer.  In
74kernel tickle mode, progress of the kernel is ensured.  In user
75tickle mode, the ability for user programs to run within a known
76period of time is ensured.  Note that user tickle mode must be
77used with caution; on a heavily loaded system, the timer may
78expire accidentally, even though user programs may be making
79(very slow) progress.
80.Pp
81In both modes, an attempt is made to refresh the watchdog timer
82in one half the timer's configured period.  That is, if the
83watchdog timer has a period of 30 seconds, a refresh attempt
84is made every 15 seconds.
85.Pp
86If called without arguments,
87.Nm
88will list the timers available on the system.  When arming a
89watchdog timer, the
90.Ar timer
91argument is the name of the timer to arm.
92.Pp
93Only one timer may be armed at a time; if an attempt is made
94to arm a timer when one is already armed, an error message
95will be displayed and no action will be taken.
96.Pp
97The options are as follows:
98.Bl -tag -width indent
99.It Fl k
100Arm
101.Ar timer
102in kernel tickle mode.
103.It Fl u
104Arm
105.Ar timer
106in user tickle mode.
107.It Fl A
108When arming a timer, this flag indicates that an audible alarm is
109to sound when the watchdog timer expires and resets the system.
110If the selected timer does not support an audible alarm, this
111option will be silently ignored.
112.It Fl p Ar period
113When arming a timer, this flag configures the timer period to
114.Ar period
115seconds.  If the specified period it outside the timer's
116range, an error message will be displayed and no action will
117be taken.
118.It Fl d
119This flag disarms the currently active timer.
120.El
121.Sh FILES
122/dev/watchdog -- the system monitor watchdog timer device
123.Sh SEE ALSO
124.Xr envsys 4 ,
125.Xr envstat 8
126.Sh HISTORY
127The
128.Nm
129command first appeared in
130.Nx 1.5.1 .
131.Sh AUTHORS
132The
133.Nm
134command and the
135.Nx
136watchdog timer framework were written by
137.An Jason R. Thorpe
138.Aq thorpej@zembu.com ,
139and contributed by Zembu Labs, Inc.
140