Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2009 22:03:58 -0400
From:      mike@sentex.net
To:        Brad Waite <freebsd@wcubed.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: watchdog questions
Message-ID:  <6nr1051kvjm0gh1inhl7ci88u0e8qcp9nk@4ax.com>
In-Reply-To: <4A00AA73.8080101@wcubed.net>
References:  <4A00AA73.8080101@wcubed.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 05 May 2009 15:06:59 -0600, in sentex.lists.freebsd.questions
you wrote:


>
>'watchdog -t <n>' starts a watchdog for n seconds.  Runing watchdog(8) =
again in
><n seconds, resets the timer.  If 'watchdog -t 0' is run, the kernel =
disables
>the watchdog.
>
>watchdogd(8) either runs stat(2) on /etc, or a user-defined cmd (with =
-e), and
>resets the watchdog only on a zero exit code.
>
>There's a few things that aren't clear, though:
>
>How many watchdog timers can be enabled at a given time?  If more than =
one,
>does a single 'watchdog -t 0' disable all timers?
Hi,
	A single timer.  If you want to disable the daemon and disarm
it, just kill off the daemon


>
>Upon timer expiration, can the kernel be configured to do anything OTHER=
 than
>rebooting?

Not that I am aware of

>
>Is it the general idea that watchdog(8) would be run in a script, making=
 sure
>the script doesn't hang?  And that watchdogd(8) is run to ensure the =
entire
>system doesn't hang?

Yes, that can be done.  One thing we do for some of our embedded
devices is use the watchdog facility as a "safe way to reboot" the
system.  If we detect a state where we should not be in, we do a

 killall -9 watchdogd

... As as way to ensure the device will reboot.  Note, we have
everything mounted ro so we dont have to worry about file system
issues.

Does the platform you are using support hardware watchdogs ?

	---Mike




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6nr1051kvjm0gh1inhl7ci88u0e8qcp9nk>