IPMI and the ipmitool command
Video 057 of 140 in Virtualization Foundations, in the unit “Server hardware and out-of-band management”. 3:38, with English and Hindi audio.
Every server brand has its own remote management hardware, and each has its own web page. IPMI is a shared standard that lets one tool talk to many brands in the same way. This article explains what IPMI covers, what the ipmitool command does on Linux, and how to install it and ask a server for its power state. It also warns about power commands, which act at once.
What you will learn
- IPMI is a shared standard for reading sensors, reading the event log and controlling power.
- ipmitool is the Linux command that speaks IPMI over the network.
- Check a server's power state before you change anything.
- A wrong address, a wrong user or a blocked port stops the tool from reaching the BMC.
- Power actions act at once, and a power off is like pulling the plug.
Many brands, one shared standard
Management hardware differs from brand to brand, and each one has its own web page. IPMI, which stands for Intelligent Platform Management Interface, is a shared standard. It gives one way to read sensors, read the event log, and control power on a server's management controller, the BMC.
On Linux, the tool that speaks this standard is called ipmitool. It is a command that talks IPMI over the network to a server's BMC.
Installing the tool
Start on an Ubuntu machine. One command installs ipmitool with the package manager. The exercise at the end of this article walks through that command, followed by the status check.
Asking a server for its power state
The status command asks a BMC for the chassis power state. The chassis is the server's enclosure, so this asks whether the machine itself is powered. The address, a user name, and the lanplus setting tell the tool how to connect.
ipmitool -I lanplus -H 192.0.2.21 -U ops-readonly -E chassis power statusOther things the tool can do
- Read sensor readings, such as temperatures, fan speeds and voltages.
- Read the event log, which holds the warnings and faults the BMC has kept.
- Control power: turn it on, turn it off, cycle it, or reset the machine.
What goes wrong
Power actions act at once. A power off is like pulling the plug on a running server, so shut the operating system down first. A wrong address, a wrong user, or a blocked port means the tool cannot open a session with the BMC. You notice it when the command waits and then fails. Check the address, the user and the network path.
Note: Do not type a password on the command line, and keep the BMC's management port off the networks that users browse from.
Install the tool and check a BMC
You need a Linux machine with administrator rights, and the address and user of a BMC that you are allowed to query. The status command only asks for information, so it changes nothing on the server.
Install the ipmitool command with the package manager, using administrator rights.
sudo apt install ipmitoolAsk the BMC for its chassis power state. Replace the address and user with your own BMC's details, and keep to this read-only query.
ipmitool -I lanplus -H 192.0.2.21 -U ops-readonly -E chassis power status
Terms
- IPMI
- Intelligent Platform Management Interface: a shared standard for reading sensors, the event log and power on a server's BMC.
- ipmitool
- A Linux command that talks to a server's BMC over the network, using the IPMI standard.
- Chassis
- The enclosure of a server, meaning its physical box.
Check yourself
What does IPMI stand for, and what is it for?
Intelligent Platform Management Interface. It is a shared standard for reading sensors, the event log and power on a server's BMC.
Why can one tool work with many brands of server?
Because IPMI is a shared standard, so the same tool can talk to the management hardware of many brands in the same way.
What should you check first when ipmitool cannot reach a server?
The address, the user and the network path to the BMC, because a wrong value or a blocked port stops the session.
Previous: The BMC: a small computer inside the server. Next: Redfish: a web-style way to manage servers.