LinuxCommandLibrary

ipmitool

Manage servers via IPMI protocol

TLDR

Open IPMI shell on the local hardware

$ sudo ipmitool shell
copy

Open IPMI shell on a remote host
$ ipmitool -H [ip_address] -U [user_name] shell
copy

SYNOPSIS

ipmitool [-I ] [-H ] [-U ] [-P ] [-p ] [-L ] [-C ] [-k ] [-h] [-v] [...]

PARAMETERS

-I
    Specifies the IPMI interface to use (e.g., lanplus for remote access, kcs for local KCS). Common options include lan, lanplus, kcs, smic, ssw, open.

-H
    Specifies the remote BMC hostname or IP address for lan or lanplus interface operations.

-U
    Specifies the username for authentication to the remote BMC.

-P
    Specifies the password for authentication to the remote BMC. It's recommended to avoid plaintext passwords directly on the command line.

-p
    Specifies the destination UDP port for remote IPMI connections (default is 623).

-L
    Specifies the privilege level for the IPMI session (e.g., user, operator, administrator, oem).

-C
    Specifies the cipher suite to use for lanplus connections. Useful for compatibility issues with older BMCs.

-k
    Specifies the authentication key for SOL (Serial Over LAN) or other key-based authentication methods.

-h
    Displays the help message with basic usage information and exits.

-v
    Increases verbosity level for debugging output, useful for troubleshooting connection or command issues.


    The specific IPMI subcommand to execute (e.g., sensor, power, sel, chassis, lan, user).


    Arguments specific to the chosen IPMI subcommand. These vary greatly depending on the command.

DESCRIPTION

ipmitool is a powerful command-line utility designed for managing and configuring devices that support the Intelligent Platform Management Interface (IPMI). IPMI is an industry-standard interface used by server hardware for out-of-band management. This unique capability means that ipmitool can interact directly with the server's Baseboard Management Controller (BMC), independent of the operating system running on the server. Administrators can use it to monitor system health (temperatures, voltages, fan speeds), manage power states (power on/off/cycle), retrieve sensor readings, view and clear System Event Logs (SEL), configure network settings for the BMC, and even perform firmware updates.

ipmitool supports various communication interfaces, including LAN (via RMCP+) for remote access, local system interfaces (KCS, SMIC, SSW), and serial. Its versatility makes it an indispensable tool for server administrators managing large data centers or remote hardware, allowing critical operations even when the server's main CPU is powered off or unresponsive.

CAVEATS

Security Risks: Providing passwords directly on the command line (via -P) is insecure as it can be visible in process lists (ps output) or command history. It's recommended to use environment variables or interactively enter the password.
Firmware Dependencies: The functionality and available commands can vary significantly based on the BMC firmware version and hardware vendor implementation. Outdated firmware may have security vulnerabilities or limited features.
Network Configuration: For remote operations, ensure proper network connectivity and firewall rules to allow IPMI traffic (UDP port 623) to the BMC's IP address.
Complexity: IPMI is a broad specification, and ipmitool reflects this with numerous subcommands and options, requiring familiarity with IPMI concepts for effective use.

<I><B>COMMON USAGE PATTERNS</B></I>

ipmitool typically follows the pattern ipmitool -I lanplus -H -U -P [args]. Some frequently used commands include:

  • power status, power on, power off, power cycle: For managing server power state.
  • sensor list: To display all sensor readings (temperatures, voltages, fan speeds).
  • sel list, sel clear: To view and clear System Event Logs (SEL).
  • lan print, lan set: To view and configure network settings for the BMC.
  • chassis status: To get the chassis power status and operational state.

<I><B>IMPORTANCE OF OUT-OF-BAND MANAGEMENT</B></I>

The primary benefit of IPMI and ipmitool is the ability to manage servers 'out-of-band'. This means management operations can be performed even if the server's operating system has crashed, is powered off, or is otherwise unresponsive. This capability is crucial for remote data centers, Lights-Out Management (LOM), and maintaining server availability and health without requiring physical presence or an operational OS.

HISTORY

The Intelligent Platform Management Interface (IPMI) standard itself was developed by Intel, Dell, Hewlett-Packard, and NEC and first released in 1998. It quickly became an industry standard for out-of-band server management. ipmitool emerged as a widely used open-source command-line utility to interact with IPMI-enabled hardware. Its development has been community-driven, providing a flexible and powerful interface to the capabilities offered by BMCs, making it an indispensable tool for system administrators and datacenter operations over the past two decades.

SEE ALSO

freeipmi(1), dmidecode(8), ipmi_sim(1)

Copied to clipboard