From owner-freebsd-stable@FreeBSD.ORG Sat May 8 14:26:58 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5240D106564A for ; Sat, 8 May 2010 14:26:58 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 3C5A18FC08 for ; Sat, 8 May 2010 14:26:57 +0000 (UTC) Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta06.emeryville.ca.mail.comcast.net with comcast id F1dP1e0031vN32cA62Sx09; Sat, 08 May 2010 14:26:57 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta22.emeryville.ca.mail.comcast.net with comcast id F2Sw1e00S3S48mS8i2SxhZ; Sat, 08 May 2010 14:26:57 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 8F4609B425; Sat, 8 May 2010 07:26:55 -0700 (PDT) Date: Sat, 8 May 2010 07:26:55 -0700 From: Jeremy Chadwick To: rihad Message-ID: <20100508142655.GA90968@icarus.home.lan> References: <4BE561C7.70702@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BE561C7.70702@mail.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: Enabling watchdog X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 14:26:58 -0000 On Sat, May 08, 2010 at 06:06:15PM +0500, rihad wrote: > Hi, I'm thinking of enabling the watchdog on our Dell PowerEdge 2950 > / FreeBSD 8.0 amd64, so that it reboots the machine in case of > lockups. > Right now it doesn't work: > > # watchdog > watchdog: patting the dog: Operation not supported > # This is almost certainly a failed WDIOCPATPAT ioctl() call, indicating you don't have support for watchdog stuff in your kernel. Once you add that, be aware you'll need to run watchdogd(8) as well. > Looking through the kernel configuration I found two relevant settings: > In /sys/conf/NOTES: > # > # Add software watchdog routines. > # > options SW_WATCHDOG > > > and in /sys/amd64/conf/NOTES: > # > # Watchdog routines. > # > options MP_WATCHDOG > > > Which of them should I rebuild the kernel with? BTW, the existing > kernel is built with the default "options SCHED_ULE" to make good use > of multiple CPUs, does watchdog work with it? I think what you want is SW_WATCHDOG, but I have no idea if this works properly or effectively on multiprocessor machines. MP_WATCHDOG may address that, but does not work with SCHED_ULE[1]. I would recommend reading the watchdog(4) and watchdogd(8) man pages. I would also recommend reading [2], since it sheds some light on how MP_WATCHDOG works. [1]: See src/sys/amd64/amd64/mp_watchdog.c, around line 32. There's an #error statement that gets hit if SCHED_ULE is used. [2]: See src/sys/amd64/amd64/mp_watchdog.c, around line 51. There's a large comment explaining what MP_WATCHDOG does. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |