Howto setup IPMI under Linux (RHEL/CentOS 5) on the HP BL460c (Intel(R) Xeon(R) E5430)

IPMI is a standardized message-based hardware management interface that provides a foundation for full monitoring of system health and management of the system, both locally and remotely in a secure manner.
The hardware chip that implements the core of IPMI is known as the Baseboard Management Controller (BMC), or Management Controller (MC).
And there are many companies that support IPMI. Dell, HP, Intel Corporation and NEC Corporation …

In our case and In practice, we will use the hp-OpenIPMI and hpasm drivers with RHEL/CentOS 5,
you must install the “kernel-devel” package and make sure its version matches the “kernel”
package you’re currently using. The “kernel-devel” package contains the necessary .config file for building kernel modules
(which is what the hp-OpenIPMI package wants to do).
$ sudo yum install kernel-devel

Fetch the HP OpenIPMI device drivers package and install it:
$ wget ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p402764200/v49065/hp-OpenIPMI-8.3.0-69.rhel5.i386.rpm
$ sudo rpm -ivh hp-OpenIPMI-8.3.0-69.rhel5.i386.rpm

The modules installed by the hp-OpenIPMI driver are :
ipmi_devintf.ko, ipmi_msghandler.ko, ipmi_poweroff.ko, ipmi_si.ko, ipmi_watchdog.ko

Install OpenIPMI the open source IPMI client:
$ sudo yum install OpenIPMI.i386

Create a patch file with this contenent:
$ cat > ipmi.patch

*** ipmi 2009-10-01 10:05:37.000000000 +0000
— /etc/init.d/ipmi 2009-09-30 10:53:20.000000000 +0000
***************
*** 335,341 ****
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
! [ `lsmod | grep -c “ipmi_devintf”` -eq 0 ] &&
rm -f “/dev/ipmi${INTF_NUM}”
}

— 335,341 —-
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
! [ `/sbin/lsmod | grep -c “ipmi_devintf”` -eq 0 ] &&
rm -f “/dev/ipmi${INTF_NUM}”
}

***************
*** 345,353 ****
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
! [ `lsmod | grep -c “ipmi_devintf”` -eq 0 ] &&
rm -f “/dev/ipmi${INTF_NUM}”
! lsmod | egrep -q “ipmi_(poweroff|watchdog)” > /dev/null 2>&1
if [ “$?” -ne “0” ]; then
stop_watchdog_quiet
stop_powercontrol_quiet
— 345,353 —-
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
! [ `/sbin/lsmod | grep -c “ipmi_devintf”` -eq 0 ] &&
rm -f “/dev/ipmi${INTF_NUM}”
! /sbin/lsmod | egrep -q “ipmi_(poweroff|watchdog)” > /dev/null 2>&1
if [ “$?” -ne “0” ]; then
stop_watchdog_quiet
stop_powercontrol_quiet
***************
*** 409,415 ****
— 409,424 —-

#############################################################################
start()
+
{
+ maj=`cat /proc/devices | awk ‘/ipmidev/{print $1}’`
+ if [ -c /dev/ipmi0 ]
+ then
+ rm -f /dev/ipmi0
+ /bin/mknod /dev/ipmi0 c $maj 0
+ else
+ /bin/mknod /dev/ipmi0 c $maj 0
+ fi
echo -n “Starting ${MODULE_NAME} drivers: ”
load_ipmi_modules
if [ ${RETVAL} -eq 0 ]; then

To apply the patch to the ipmi file, change to the directory where the file is located:
$ cd /etc/init.d
$ sudo patch -p1 -i ~/ipmi.patch

Launch the IPMI service, which will load the kernel modules for you
$ sudo /etc/init.d/ipmi start

Fetch the HP System Health Application and Insight Management Agents package for Red Hat Enterprise Linux 5 (x86) like this:
$ wget ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p1925054526/v42992/hpasm-8.0.0-173.rhel5.i386.rpm
Let installed it with rpm and configure it before
$ sudo rpm -ivh hpasm-8.0.0-173.rhel5.i386.rpm
$ sudo /etc/init.d/hpasm configure

Start the hpasm agents using the command
$ sudo /etc/init.d/hpasm start

There are two ways to configure the BMC. You can configure it through the boot-time menu (Ctrl-E), where you can set the management password and IP address information. Or, you can configure it with ipmitool from the OS. We will configure it from OS so create a custom ipmi_lan.conf with this content
$ cat /etc/ipmi_lan.conf
addr 0.0.0.0
priv_limit admin
allowed_auths_callback md5
allowed_auths_user md5
allowed_auths_operator md5
allowed_auths_admin md5
user 2 true “username” “password” admin 1 md5

Start the ipmi daemon that will listen in all interfaces and will bind the 623 port by default.
$ sudo ipmilan -c /etc/ipmi_lan.conf

Add rule to the firewall if it’s running, this run tell to iptables to make the udp port 623 listening for connection coming from 192.168.0.18:
$ sudo vim /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state –state NEW -m udp -s 192.168.0.18 -p udp –dport 623 -j ACCEPT

Finally, to view the chassis status from a remote server, use the following command from your remote machine :
In this example from my Debian i do this :
$ ipmitool -I lan -U username -H 192.168.0.2 -a chassis status
Password:
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : always-on
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false
Front Panel Control : none

Note the ‘-H’ option indicates the remote machine, ‘-U’ option parameter is the ‘userid’ name. The ‘-a’ option indicates to prompt for password.
This IPMItool command ‘chassis command’ result some information and the status of the machine’s system
Note that you cannot only get the status of the machine, you can also power it on and off, reset, adjust fan speeds etc …

For IPMI Problems please refer to https://twiki.cern.ch/twiki/bin/view/FIOgroup/IpmiPrb

Howto setup IPMI under Linux (RHEL/CentOS 5) on the HP BL460c (Intel(R) Xeon(R) E5430)

2 thoughts on “Howto setup IPMI under Linux (RHEL/CentOS 5) on the HP BL460c (Intel(R) Xeon(R) E5430)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s