Knowledgebase

Find frequently asked questions and setup guides by searching or by browsing the categories.

Install ipmitool

sudo apt install ipmitool    # Debian and Ubuntu
sudo dnf install ipmitool    # AlmaLinux and Rocky Linux

IPMI itself, and why the controller works even when the server is off, is explained in what IPMI is.

Local and Remote Use

Locally, on the server's own operating system, ipmitool talks to the controller through kernel drivers. Load them if /dev/ipmi0 is missing:

sudo modprobe ipmi_devintf
sudo modprobe ipmi_si
sudo ipmitool mc info

Remotely, from another machine on the management network, use the IPMI 2.0 LAN interface with -I lanplus, the controller's address, and a user name. Never put the password on the command line: it would be visible in the process list and saved in your shell history. Let ipmitool ask for it with -a:

ipmitool -I lanplus -H 203.0.113.10 -U ADMIN_USER -a chassis power status

For scripts, -E reads the password from the IPMI_PASSWORD environment variable. Set it without typing it into a command:

read -rs IPMI_PASSWORD && export IPMI_PASSWORD
ipmitool -I lanplus -H 203.0.113.10 -U ADMIN_USER -E chassis power status

The examples below leave out the connection options; add them for remote use.

Power Control

CommandWhat it does
chassis power statusShows on or off
chassis power onSwitches on
chassis power softAsks the OS to shut down
chassis power offCuts power at once
chassis power cycleOff, then on again
chassis power resetHard reset

off, cycle, and reset are like pulling the plug: unsaved data is lost and file systems are not cleanly unmounted. Try soft or a shutdown over SSH first, and use the hard commands only when the server no longer responds.

Choose the Next Boot Device

ipmitool chassis bootdev pxe
ipmitool chassis bootdev cdrom
ipmitool chassis bootdev disk
ipmitool chassis bootdev bios

The setting applies to the next boot only. pxe starts a network installation (see what PXE boot is), cdrom boots mounted virtual media, and bios opens the firmware setup. Follow it with a power cycle or reset.

Event Log and Sensors

ipmitool sel elist
ipmitool sdr list
ipmitool sensor list

The system event log (SEL) records hardware events such as memory errors, power supply failures, and overheating, with time stamps. sdr list gives a short status line per sensor; sensor list adds the thresholds. When a server restarts without a reason in the system logs, check the SEL. Save it before you clear it, since sel clear erases the history.

Serial over LAN

ipmitool -I lanplus -H 203.0.113.10 -U ADMIN_USER -a sol activate

Serial over LAN (SOL) shows the server's serial console in your terminal: boot messages, the GRUB menu, and a login prompt, if the system sends its console to the serial port. Type ~. at the start of a line to leave the session (inside an SSH session, SSH catches the ~ first: type it twice, or pick another escape character with -e), and run sol deactivate if an old session is still open.

Network Settings and Users

ipmitool lan print 1
ipmitool user list

lan print shows the controller's IP address, netmask, gateway, and MAC address; user list shows the accounts and their privilege levels. The LAN channel number (here 1) differs between boards. Change passwords in the controller's web interface where possible, so the new password never appears in a command line or your shell history, and check the result with a new login.

Keep IPMI Off the Internet

An IPMI interface grants full control of the server and has a long history of weaknesses. Put it on a separate management network or VLAN (see what a VLAN is), reach that network over a VPN, use strong passwords and personal accounts, and keep the controller's firmware current. Dell's controller is described in what iDRAC is.

Was this answer helpful?
Loading...