NetBSD/sbin/wdogctl/wdogctl.8

181 lines
5.5 KiB
Groff
Raw Normal View History

2006-08-14 03:23:30 +04:00
.\" $NetBSD: wdogctl.8,v 1.14 2006/08/13 23:23:30 wiz 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.
.\"
2006-08-14 03:23:30 +04:00
.Dd August 13, 2006
.Dt WDOGCTL 8
2001-06-05 15:22:41 +04:00
.Os
.Sh NAME
.Nm wdogctl
.Nd Watchdog timer control utility
.Sh SYNOPSIS
.Nm
.Nm
.Fl d
.Nm
.Fl e
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.Nm
.Fl k
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.Nm
.Fl t
.Nm
.Fl u
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.Nm
.Fl x
.Op Fl A
.Op Fl p Ar seconds
.Ar timer
.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 three basic modes in which watchdog timers may
operate: kernel tickle mode, user tickle mode, and external 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.
A user-mode timer is disarmed (if possible) when the device is closed,
unless the timer is activated with the
.Fl x
option.
.Pp
External-mode watchdogs are similar to user-mode watchdogs, except
that the tickle must be done explicitly by a separate invocation of
the program with the
.Fl t
option.
.Pp
In the first two 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 -offset indent -width XpXperiodXX
.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 d
This flag disarms the currently active timer.
Note that not all watchdog timers can be disabled once armed.
If the selected timer can not be disabled,
an error message will be displayed and the
timer will remain armed.
.It Fl e
Arm
.Ar timer
in external tickle mode.
.It Fl k
Arm
.Ar timer
in kernel tickle mode.
.It Fl p Ar period
When arming a timer, this flag configures the timer period to
.Ar period
seconds.
If the specified period is outside the timer's range,
an error message will be displayed and no action will be taken.
.It Fl t
This flag tickles an external mode timer.
.It Fl u
Arm
.Ar timer
in user tickle mode.
.It Fl x
Arm
.Ar timer
in a modified user tickle mode: closing the device will not disarm
the timer.
.El
.Sh FILES
2002-07-30 01:08:30 +04:00
.Pa /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 .
2001-11-16 14:27:09 +03:00
.Sh AUTHORS
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.