From owner-freebsd-questions@FreeBSD.ORG Wed May 6 02:17:23 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AC2E106567A for ; Wed, 6 May 2009 02:17:23 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 388828FC1B for ; Wed, 6 May 2009 02:17:23 +0000 (UTC) (envelope-from mike@sentex.net) Received: from Mobile2.sentex.ca (cage.simianscience.com [64.7.134.1]) by smarthost1.sentex.ca (8.14.3/8.14.3) with SMTP id n4623cMp018139; Tue, 5 May 2009 22:03:38 -0400 (EDT) (envelope-from mike@sentex.net) From: mike@sentex.net To: Brad Waite Date: Tue, 05 May 2009 22:03:58 -0400 Message-ID: <6nr1051kvjm0gh1inhl7ci88u0e8qcp9nk@4ax.com> References: <4A00AA73.8080101@wcubed.net> In-Reply-To: <4A00AA73.8080101@wcubed.net> X-Mailer: Forte Agent 4.2/32.1118 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: freebsd-questions@freebsd.org Subject: Re: watchdog questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 02:17:23 -0000 On Tue, 05 May 2009 15:06:59 -0600, in sentex.lists.freebsd.questions you wrote: > >'watchdog -t ' starts a watchdog for n seconds. Runing watchdog(8) = again in >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