2003-02-25 13:34:36 +03:00
|
|
|
.\" $NetBSD: wdogctl.8,v 1.8 2003/02/25 10:35:12 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.
|
|
|
|
.\"
|
2002-07-30 01:00:15 +04:00
|
|
|
.Dd July 29, 2002
|
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
|
2000-11-04 21:53:30 +03:00
|
|
|
.Fl k
|
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm
|
2000-11-04 21:53:30 +03:00
|
|
|
.Fl u
|
|
|
|
.Op Fl A
|
|
|
|
.Op Fl p Ar seconds
|
|
|
|
.Ar timer
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm
|
2000-11-04 21:53:30 +03:00
|
|
|
.Fl d
|
|
|
|
.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
|
|
|
|
kernel provides two basic modes in which watchdog timers may
|
2002-10-03 19:41:44 +04:00
|
|
|
operate: kernel tickle mode and user tickle mode.
|
|
|
|
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.
|
|
|
|
.Pp
|
|
|
|
In both 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:
|
|
|
|
.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
|
2002-10-03 19:41:44 +04:00
|
|
|
seconds.
|
|
|
|
If the specified period it outside the timer's range,
|
|
|
|
an error message will be displayed and no action will be taken.
|
2000-11-04 21:53:30 +03:00
|
|
|
.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.
|
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.
|