2006-08-14 03:23:30 +04:00
|
|
|
.\" $NetBSD: wdogctl.8,v 1.14 2006/08/13 23:23:30 wiz Exp $
|
2000-11-04 21:53:30 +03:00
|
|
|
.\"
|
|
|
|
.\" 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
|
2000-11-04 21:53:30 +03:00
|
|
|
.Dt WDOGCTL 8
|
2001-06-05 15:22:41 +04:00
|
|
|
.Os
|
2000-11-04 21:53:30 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm wdogctl
|
|
|
|
.Nd Watchdog timer control utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm
|
2005-01-11 14:29:22 +03:00
|
|
|
.Fl d
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm
|
2005-01-11 14:29:22 +03:00
|
|
|
.Fl e
|
2000-11-04 21:53:30 +03:00
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm
|
2005-01-11 14:29:22 +03:00
|
|
|
.Fl k
|
2005-01-10 01:51:32 +03:00
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
|
|
|
.Nm
|
|
|
|
.Fl t
|
|
|
|
.Nm
|
2005-01-11 14:29:22 +03:00
|
|
|
.Fl u
|
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
2006-08-13 05:11:01 +04:00
|
|
|
.Nm
|
|
|
|
.Fl x
|
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
2000-11-04 21:53:30 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2002-10-03 19:41:44 +04:00
|
|
|
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
|
2000-11-04 21:53:30 +03:00
|
|
|
software; when the timer expires, the watchdog resets the system.
|
|
|
|
In this case of a hardware watchdog timer, this is accomplished by
|
2002-10-03 19:41:44 +04:00
|
|
|
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,
|
2000-11-04 21:53:30 +03:00
|
|
|
something must refresh the timer to prevent it from expiring.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nx
|
2005-01-10 01:51:32 +03:00
|
|
|
kernel provides three basic modes in which watchdog timers may
|
|
|
|
operate: kernel tickle mode, user tickle mode, and external tickle mode.
|
2002-10-03 19:41:44 +04:00
|
|
|
In kernel tickle mode, a timer in the kernel refreshes the watchdog timer.
|
2000-11-04 21:53:30 +03:00
|
|
|
In user tickle mode,
|
|
|
|
.Nm
|
2002-10-03 19:41:44 +04:00
|
|
|
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
|
2000-11-04 21:53:30 +03:00
|
|
|
expire accidentally, even though user programs may be making
|
|
|
|
(very slow) progress.
|
2006-08-13 05:11:01 +04:00
|
|
|
A user-mode timer is disarmed (if possible) when the device is closed,
|
|
|
|
unless the timer is activated with the
|
|
|
|
.Fl x
|
|
|
|
option.
|
2005-01-10 01:51:32 +03:00
|
|
|
.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.
|
2000-11-04 21:53:30 +03:00
|
|
|
.Pp
|
2005-01-10 01:51:32 +03:00
|
|
|
In the first two modes, an attempt is made to refresh the watchdog timer
|
2002-10-03 19:41:44 +04:00
|
|
|
in one half the timer's configured period.
|
|
|
|
That is, if the watchdog timer has a period of 30 seconds, a refresh attempt
|
2000-11-04 21:53:30 +03:00
|
|
|
is made every 15 seconds.
|
|
|
|
.Pp
|
|
|
|
If called without arguments,
|
|
|
|
.Nm
|
2002-10-03 19:41:44 +04:00
|
|
|
will list the timers available on the system.
|
|
|
|
When arming a watchdog timer, the
|
2000-11-04 21:53:30 +03:00
|
|
|
.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:
|
2005-01-21 13:40:01 +03:00
|
|
|
.Bl -tag -offset indent -width XpXperiodXX
|
2000-11-04 21:53:30 +03:00
|
|
|
.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
|
2002-10-03 19:41:44 +04:00
|
|
|
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
|
2002-07-30 01:00:15 +04:00
|
|
|
timer will remain armed.
|
2005-01-11 14:29:22 +03:00
|
|
|
.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.
|
2005-01-10 01:51:32 +03:00
|
|
|
.It Fl t
|
|
|
|
This flag tickles an external mode timer.
|
2005-01-11 14:29:22 +03:00
|
|
|
.It Fl u
|
|
|
|
Arm
|
|
|
|
.Ar timer
|
|
|
|
in user tickle mode.
|
2006-08-13 05:11:01 +04:00
|
|
|
.It Fl x
|
|
|
|
Arm
|
|
|
|
.Ar timer
|
|
|
|
in a modified user tickle mode: closing the device will not disarm
|
|
|
|
the timer.
|
2000-11-04 21:53:30 +03:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
2002-07-30 01:08:30 +04:00
|
|
|
.Pa /dev/watchdog
|
|
|
|
-- the system monitor watchdog timer device
|
2000-11-04 21:53:30 +03:00
|
|
|
.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
|
2000-11-04 21:53:30 +03:00
|
|
|
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.
|