IPMI in Practice
IPMI is still common on older servers, and you will absolutely run into it in production. The useful thing to know is the small set of commands and security points that matter day to day.
What you use it for
Section titled “What you use it for”IPMI is mostly used for:
- Powering a server on, off, or cycling it
- Reading sensor data like temperature, fan speed, and voltage
- Checking the system event log
- Accessing the serial console over LAN
- Pulling hardware inventory
ipmitool
Section titled “ipmitool”ipmitool is the standard CLI for IPMI. The remote form you will use most often is:
ipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus <subcommand>Use lanplus rather than lan when possible. lanplus is the modern IPMI 2.0 path and is the one you should expect to work with.
Common commands
Section titled “Common commands”# Power stateipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus power statusipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus power onipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus power offipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus power cycle
# Sensorsipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus sdr listipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus sdr type Temperature
# Event logipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus sel list
# Serial consoleipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus sol activate# Exit SOL with: ~.
# Inventoryipmitool -H <bmc-ip> -U <user> -P <pass> -I lanplus fru printA practical detail: ipmitool output is plain text. If you build automation around it, expect to parse text rather than JSON.
Local vs. remote
Section titled “Local vs. remote”IPMI can also be used locally on the host itself via the kernel interface:
ipmitool power statusipmitool sdr listThat local path is useful for on-host automation, but remote IPMI-over-LAN is what you will use for out-of-band access.
Security points you should know
Section titled “Security points you should know”IPMI has a weak security story compared with modern management APIs. The two things to remember are:
- IPMI should not be reachable from untrusted networks
- Do not assume the BMC is safe just because it is “internal”
Where it still shows up
Section titled “Where it still shows up”You will still see IPMI in:
- older hardware
- existing automation that has not been migrated
- pre-OS provisioning workflows
- quick one-off operations when
ipmitoolis simply the fastest tool