8486e6
8486e6
Instructions for how to set up the watchdog daemon to work with IPMI's hardware watchdog
8486e6
----------------------------------------------------------------------------------------
8486e6
8486e6
First, verify that the ipmitool utility is present on the system to allow
8486e6
the watchdog timer to be turned off via the command line (which ipmitool).
8486e6
This will allow the hardware watchdog timer to be turned off gracefully
8486e6
should it ever become necessary.   If ipmitool is not present, install
8486e6
it or download the latest version from http://ipmitool.sourceforge.net and
8486e6
build and install it on your system.
8486e6
8486e6
Next, prior to starting up the watchdog daemon, the BMC BIOS should be set 
8486e6
to enable the IPMI/BMC hardware watchdog timer, the OpenIPMI watchdog driver 
8486e6
module should be inserted with the desired configuration/startup settings, 
8486e6
and the watchdog daemon's configuration file should be modified to use /dev/watchdog:
8486e6
8486e6
     1. To setup the IPMI/BMC BIOS to enable the hardware watchdog
8486e6
     timer, see BMC documentation. The main settings in the BMC BIOS 
8486e6
     requiring modification to turn on the IPMI watchdog timer are: 
8486e6
8486e6
      - Set the BMC POST Watchdog to "ENABLED".
8486e6
      - Set the BMC POST Watchdog Timeout to "5 Minutes".
8486e6
8486e6
     2. To insert the OpenIPMI watchdog driver module with the
8486e6
     desired configuration settings, two steps are necessary: 
8486e6
8486e6
        i.) Configure the OpenIPMI watchdog driver by editing the 
8486e6
            /etc/sysconfig/ipmi configuration file:
8486e6
8486e6
          - Set "IPMI_WATCHDOG=yes".
8486e6
          - Set desired options via the IPMI_WATCHDOG_OPTIONS
8486e6
            config entry.
8486e6
8486e6
           EXAMPLE: 'IPMI_WATCHDOG_OPTIONS="timeout=60 start_now=1 \
8486e6
                   preop=preop_give_data action=power_cycle pretimeout=1" '
8486e6
8486e6
            Execute "modinfo ipmi_watchdog" for more detailed information
8486e6
            on the available ipmi watchdog timer options.
8486e6
8486e6
          - Execute "service ipmi start" (the watchdog driver starts 
8486e6
            automatically along with the other ipmi drivers).
8486e6
8486e6
          IMPORTANT: If "start_now=1" has been set as one of the 
8486e6
               configuration options, be sure to start up the watchdog 
8486e6
               daemon before the BMC timer expires!
8486e6
8486e6
       ii.) Set the OpenIPMI daemon and watchdog to start during bootup:
8486e6
8486e6
          - chkconfig ipmi on
8486e6
          - chkconfig watchdog on
8486e6
8486e6
8486e6
     3. Configure the watchdog daemon by editing the 
8486e6
     /etc/watchdog.conf configuration file: 
8486e6
8486e6
      - Uncomment the "watchdog-device = /dev/watchdog" line.
8486e6
      - Ensure that "realtime = yes" and "priority = 1" are set and not
8486e6
        commented-out.
8486e6
      - Uncomment the "interval" line, and set the interval to be less 
8486e6
        than what you set the timeout option to be in the /etc/sysconfig/ipmi
8486e6
        file (ex "timeout=60" so you might set interval to 50).
8486e6
8486e6
     So in the example described herein, the BMC BIOS setting is in 
8486e6
     minutes (5), and the "interval" and ipmi_watchdog "timeout" settings 
8486e6
     are both in seconds (50 and 60 respectively).  Therefore, the BMC 
8486e6
     hardware watchdog timer is set to expire and trigger a system power 
8486e6
     cycle unless reset by the watchdog daemon within 5 minutes, and the 
8486e6
     watchdog daemon will reset the timer every 60 seconds.
8486e6
8486e6
8486e6
     4. Start the Watchdog daemon:
8486e6
8486e6
      - execute "service watchdog start" 
8486e6
8486e6
8486e6
IMPORTANT:  To gracefully stop/kill the watchdog daemon, be sure
8486e6
to use "service watchdog stop" (which executes "kill -s SIGTERM <pid>")
8486e6
and do *not* use "kill -9 <pid>".  Using "kill -9 <pid>" will cause the 
8486e6
daemon to be shut off without stopping the BMC's watchdog timer, thus 
8486e6
a system reboot will be triggered when the BMC's watchdog timer expires.
8486e6
8486e6
Alternately, or in case the watchdog daemon is killed "ungracefully", 
8486e6
you can stop the BMC timer by executing the following ipmitool utility 
8486e6
command before the watchdog timer expires:
8486e6
8486e6
 # ipmitool -v raw 0x06 0x24 0x04 0x01 0x00 0x10 0x00 0x0a
8486e6
8486e6
----------------------------------------------------------------------
8486e6
8486e6
To test the watchdog after system configuration and setup:
8486e6
8486e6
.  Use kill -9 on the watchdog daemon so it doesn't shut down the watchdog daemon 
8486e6
   gracefully.  Verify that the system gets reset after the BMC timer expires.
8486e6
 
8486e6
.  Use "service watchdog stop" and verify that the watchdog daemon shuts off
8486e6
   the BMC watchdog timer gracefully (the system doesn't get reset).
8486e6
8486e6
.  Set the timer on the watchdog daemon to be greater than the time set in
8486e6
   the BMC BIOS for system reset and verify that the system is reset.
8486e6
8486e6
.  Set the timer on the daemon to be less than the time set in the
8486e6
   BMC timer and verify that the BMC watchdog is poked regularly and the 
8486e6
   system is not reset.
8486e6
8486e6
.  Test some of the other actions the BMC can take when the watchdog timer 
8486e6
   goes off (see modinfo ipmi_watchdog for some other settings to try).
8486e6