Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 May 2010 07:26:55 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        rihad <rihad@mail.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Enabling watchdog
Message-ID:  <20100508142655.GA90968@icarus.home.lan>
In-Reply-To: <4BE561C7.70702@mail.ru>
References:  <4BE561C7.70702@mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |




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