Howto setup IPMI under Linux (RHEL/CentOS 5)

Portal Home > Knowledgebase > Others > Howto setup IPMI under Linux (RHEL/CentOS 5)

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
$ 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
# 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
# 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
# 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
— 345,353 — -
modprobe -q -r ${m} > /dev/null 2>&1
# 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
*** 409,415 ****
— 409,424 — -

+ 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: “
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
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
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
$ sudo vim /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state –state NEW -m udp -s -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 -a chassis status
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 …


Was this answer helpful?
51 Users Found This Useful 1 Votes

Also Read