NetBSD/sbin/wdogctl/wdogctl.8

140 lines
4.8 KiB
Groff

.\" $NetBSD: wdogctl.8,v 1.2 2000/11/26 15:13:19 ad Exp $
.\"
.\" Copyright (c) 2000 Zembu Labs, Inc.
.\" All rights reserved.
.\"
.\" Author: Jason R. Thorpe <thorpej@zembu.com>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Zembu Labs, Inc.
.\" 4. Neither the name of Zembu Labs nor the names of its employees may
.\" be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
.\" RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
.\" CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 19, 2000
.Dt WDOGCTL 8
.Os NetBSD
.Sh NAME
.Nm wdogctl
.Nd Watchdog timer control utility
.Sh SYNOPSIS
.Nm
.Nm ""
.Fl k
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.Nm ""
.Fl u
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.Nm ""
.Fl d
.Sh DESCRIPTION
.Nm
is used to manipulate watchdog timers. Watchdog timers provide a
means of ensuring that a system continues to make progress. This
is accomplished by use of a timer, provided by either hardware or
software; when the timer expires, the watchdog resets the system.
In this case of a hardware watchdog timer, this is accomplished by
asserting the system's hardware reset signal. In the case of a
software watchdog timer, this is accomplished by calling the kernel's
normal reboot path. In order to prevent the system from rebooting,
something must refresh the timer to prevent it from expiring.
.Pp
The
.Nx
kernel provides two basic modes in which watchdog timers may
operate: kernel tickle mode and user tickle mode. In kernel
tickle mode, a timer in the kernel refreshes the watchdog timer.
In user tickle mode,
.Nm
runs in the background and refreshes the watchdog timer. In
kernel tickle mode, progress of the kernel is ensured. In user
tickle mode, the ability for user programs to run within a known
period of time is ensured. Note that user tickle mode must be
used with caution; on a heavily loaded system, the timer may
expire accidentally, even though user programs may be making
(very slow) progress.
.Pp
In both modes, an attempt is made to refresh the watchdog timer
in one half the timer's configured period. That is, if the
watchdog timer has a period of 30 seconds, a refresh attempt
is made every 15 seconds.
.Pp
If called without arguments,
.Nm
will list the timers available on the system. When arming a
watchdog timer, the
.Ar timer
argument is the name of the timer to arm.
.Pp
Only one timer may be armed at a time; if an attempt is made
to arm a timer when one is already armed, an error message
will be displayed and no action will be taken.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl k
Arm
.Ar timer
in kernel tickle mode.
.It Fl u
Arm
.Ar timer
in user tickle mode.
.It Fl A
When arming a timer, this flag indicates that an audible alarm is
to sound when the watchdog timer expires and resets the system.
If the selected timer does not support an audible alarm, this
option will be silently ignored.
.It Fl p Ar period
When arming a timer, this flag configures the timer period to
.Ar period
seconds. If the specified period it outside the timer's
range, an error message will be displayed and no action will
be taken.
.It Fl d
This flag disarms the currently active timer.
.El
.Sh FILES
/dev/watchdog -- the system monitor watchdog timer device
.Sh SEE ALSO
.Xr envsys 4 ,
.Xr envstat 8
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 1.5.1 .
.Sh AUTHOR
The
.Nm
command and the
.Nx
watchdog timer framework were written by
.An Jason R. Thorpe
.Aq thorpej@zembu.com ,
and contributed by Zembu Labs, Inc.