ichwd... FTW!

I've been fooling around with our server in the garage a bit more lately than I have in the past. One thing I did was just go through /etc/defaults/rc.conf to see what was new since last time I looked.... and I discovered watchdogd_enable.

"Hmm, what's this?"

Well, long and short, I discovered that it links up with the ichwd device to provide a hardware watchdog. If watchdogd doesn't "report in" every so often to the ichwd device, the machine will get a hard reset. I tested this by giving watchdogd a kill -9 and waiting (it has to be a -9 because -1 and -15 give watchdogd a chance to disable the hardware watchdog under the presumption that you are stopping it because you don't want it to run, not because you want it to cold-cock the machine). Sure enough, a few seconds later the machine reboot.

So

Code:
echo 'ichwd_load="YES"' >> /boot/loader.conf
kldload ichwd
echo 'watchdogd_enable="YES"' >> /etc/rc.conf
/etc/rc.d/watchdogd start

If attempting to load ichwd doesn't work, it may be because you lack the corresponding hardware or because that hardware may be disabled in the BIOS or some such. The driver attempts to discover this when loaded.

So far as I can tell, from /sys/amd64/conf/NOTES, the ichwd is the only hardware watchdog available.
 
Hi nsayer,

Having just built a new box around the Intel D510MO atom board, I decided to try out this watchdog malarky.

Loading the module worked and confirmed:

Code:
Jul 28 10:23:01 gate kernel: ichwd module loaded
Jul 28 10:23:01 gate kernel: ppc0: cannot reserve I/O port range
Code:
# kldstat | grep ichwd
 6    1 0xffffffff81227000 189c     ichwd.ko

Starting watchdogd didn't, however:

Code:
# grep watchdog /etc/rc.conf
watchdogd_enable="YES"
# /etc/rc.d/watchdogd start
Starting watchdogd.
/etc/rc.d/watchdogd: WARNING: failed to start watchdogd

Any idea what the problem might be? Could that ppc0 message be relevant?
 
Back
Top