svn commit: r247371 - user/alfred/ewatchdog/usr.sbin/watchdogd

Alfred Perlstein alfred at FreeBSD.org
Wed Feb 27 04:19:14 UTC 2013


Author: alfred
Date: Wed Feb 27 04:19:12 2013
New Revision: 247371
URL: http://svnweb.freebsd.org/changeset/base/247371

Log:
  Document new options.
  
  The following args are now documented:
        -debug
        -softtimeout
        -softtimeout-action action
        -pretimeout timeout
        -pretimeout-action action
  
  Also update .Dd and copyright.

Modified:
  user/alfred/ewatchdog/usr.sbin/watchdogd/watchdogd.8

Modified: user/alfred/ewatchdog/usr.sbin/watchdogd/watchdogd.8
==============================================================================
--- user/alfred/ewatchdog/usr.sbin/watchdogd/watchdogd.8	Wed Feb 27 03:43:16 2013	(r247370)
+++ user/alfred/ewatchdog/usr.sbin/watchdogd/watchdogd.8	Wed Feb 27 04:19:12 2013	(r247371)
@@ -1,3 +1,5 @@
+.\" Copyright (c) 2013  iXsystems.com,
+.\"                     author: Alfred Perlstein <alfred at freebsd.org>
 .\" Copyright (c) 2004  Poul-Henning Kamp <phk at FreeBSD.org>
 .\" Copyright (c) 2003  Sean M. Kelly <smkelly at FreeBSD.org>
 .\" All rights reserved.
@@ -25,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 2, 2006
+.Dd September 2, 2013
 .Dt WATCHDOGD 8
 .Os
 .Sh NAME
@@ -34,6 +36,11 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl dnw
+.Op Fl -debug
+.Op Fl -softtimeout
+.Op Fl -softtimeout-action Ar action
+.Op Fl -pretimeout Ar timeout
+.Op Fl -pretimeout-action Ar action
 .Op Fl e Ar cmd
 .Op Fl I Ar file
 .Op Fl s Ar sleep
@@ -108,12 +115,12 @@ will terminate.
 The
 .Nm
 utility recognizes the following runtime options:
-.Bl -tag -width ".Fl I Ar file"
+.Bl -tag -width ".Fl -softtimeout-action Ar action  "
 .It Fl I Ar file
 Write the process ID of the
 .Nm
 utility in the specified file.
-.It Fl d
+.It Fl d Fl -debug
 Do not fork.
 When this option is specified,
 .Nm
@@ -123,7 +130,70 @@ will not fork into the background at sta
 Complain when the watchdog script takes too long.
 This flag will cause watchdogd to complain when the amount of time to
 execute the watchdog script exceeds the threshold of 'sleep' option.
+.Pp
+.It Fl -pretimeout Ar timeout
+Set a "pretimeout" watchdog.  At "timeout" seconds before the watchdog
+will fire attempt an action.  The action is set by the --pretimeout-action
+flag.  The default is just to log a message (WD_SOFT_LOG) via
+.Xr log 9 .
+.Pp
+.It Fl -pretimeout-action Ar action
+Set the timeout action for the pretimeout.  See the section 
+.Sx Timeout Actions .
+.Pp
+.It Fl -softtimeout
+Instead of arming the various hardware watchdogs, only use a basic software
+watchdog.  The default action is just to
+.Xr log 9
+a message (WD_SOFT_LOG).
+.Pp
+.It Fl -softtimeout-action Ar action
+Set the timeout action for the softtimeout.  See the section 
+.Sx Timeout Actions .
+.Pp
 .El
+.Sh Timeout Actions
+The following timeout actions are available via the
+.Fl -pretimeout-action
+and
+.Fl -softtimeout-action
+flags:
+.Bl -tag -width ".Ar printf  "
+.It Ar panic
+Call
+.Xr panic 9
+when the timeout is reached.
+.Pp
+.It Ar ddb
+Enter the kernel debugger via
+.Xr kdb_enter 9
+when the timeout is reached.
+.Pp
+.It Ar log
+Log a message using
+.Xr log 9
+when the timeout is reached.
+.Pp
+.It Ar printf
+call the kernel 
+.Xr printf 9
+to display a message to the console and
+.Xr dmesg 8
+buffer.
+.Pp
+.El
+Actions can be combined in a comma separated list as so:
+.Ar log,printf
+which would both
+.Xr printf 9
+and
+.Xr log 9
+which will send messages both to
+.Xr dmesg 8
+and the kernel
+.Xr log 4
+device for
+.Xr syslog 8 .
 .Sh FILES
 .Bl -tag -width ".Pa /var/run/watchdogd.pid" -compact
 .It Pa /var/run/watchdogd.pid
@@ -148,3 +218,6 @@ and
 .Pp
 Some contributions made by
 .An Jeff Roberson Aq jeff at FreeBSD.org .
+.Pp
+The pretimeout and softtimeout action system was added by
+.An Alfred Perlstein Aq alfred at freebsd.org .


More information about the svn-src-user mailing list