Linux/ipmitool

From Omnia
Jump to: navigation, search

ipmitool

ipmitool - utility for controlling IPMI-enabled devices

Installation

Easy way:

yum install ipmitool
apt-get install ipmitool

Harder way (source code): (http://sourceforge.net/projects/ipmitool/)

yum install gcc make compat-glibc-headers
wget http://downloads.sourceforge.net/project/ipmitool/ipmitool/1.8.14/ipmitool-1.8.14.tar.bz2
tar -jvxf ipmitool-1.8.14.tar.bz2
ipmitool-1.8.14
./configure
make clean
make && make install

Load kernel module:

modprobe ipmi_devintf    # CentOS 6.5 module name

Usage

Sensor Data

sdr command - Print Sensor Data Repository entries and readings

# ipmitool sdr
P0 Temp          | 36 degrees C      | ok
P1 Temp          | 36 degrees C      | ok
P0 TjMax         | 86 degrees C      | ok
P1 Tjmax         | 86 degrees C      | ok
...

sensor command - Print detailed sensor information

# ipmitool sensor
P0 Temp          | 37.000     | degrees C  | ok    | na        | na        | na        | na        | 84.000    | na
P1 Temp          | 36.000     | degrees C  | ok    | na        | na        | na        | na        | 84.000    | na
P0 TjMax         | 86.000     | degrees C  | ok    | na        | na        | na        | na        | na        | na
P1 Tjmax         | 86.000     | degrees C  | ok    | na        | na        | na        | na        | na        | na
...

Control Remote BMC

ipmitool -I lanplus -H [BMC_ADDRESS] -U USERID -P [PASSWORD] sensor

Note, my configuration was incorrect and this would timeout:

# ipmitool -I lanplus -H i-myserver -U USERID -P mypassword sensor
Error: Unable to establish IPMI v2 / RMCP+ session
Get Device ID command failed
Unable to open SDR for reading

i2c access

If you know the bus and address of a target i2c device: (server/device specific)

usage: i2c [bus=public|# [chan=#] <i2caddr> <read bytes> [write data]

Example: (temperature sensor, there is a conversion required to get to C)

# ipmitool i2c bus=1 0x3e 1 1
 38
00111000

User List

ipmitool user list [CHANNEL_NUMBER]
# ipmitool user list 1
ID  Name             Callin  Link Auth  IPMI Msg   Channel Priv Limit
1                    true    false      true       USER
2   USERID           true    false      true       ADMINISTRATOR
3   root             true    false      false      ADMINISTRATOR

Password

ipmitool user set password [USERID] [PASSWORD]

Chassis Status

# ipmitool 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
Sleep Button Disable : not allowed
Diag Button Disable  : not allowed
Reset Button Disable : allowed
Power Button Disable : allowed
Sleep Button Disabled: false
Diag Button Disabled : false
Reset Button Disabled: false
Power Button Disabled: false

Chassis Power

# ipmitool chassis power
chassis power Commands: status, on, off, cycle, reset, diag, soft
# ipmitool chassis power status
Chassis Power is on
# ipmitool chassis reset

FRU

Field Replaceable Units (FRU) information:

fru command - Print built-in FRU and scan SDR for FRU locators

# ipmitool fru
FRU Device Description : Builtin FRU Device (ID 0)
 Chassis Type                    : Rack Mount Chassis
 Chassis Serial                  : XXXXXXXXXXXXX
 Chassis Extra                   : XXXXXXXXXXXXX
 Chassis Extra                   : XXXXXXXXXXXXX
 Board Mfg Date        : Wed May 28 11:53:00 2014
 Board Mfg             : XXX
 Board Product         : XXX
 Board Serial          : XXXXXXXXXXXXX
 Board Part Number     : XXXXXXXXXXXXX
 Board Extra           : XXX
 Product Manufacturer  : XXX
 Product Name          : XXX
 Product Part Number   : XXXXXXXXXXXXX
 Product Asset Tag     : XXX
 Product Extra         : XXX
 Product Extra         : PVT
 Product Extra         : 2014-05-28 15:53:46

XXX - removed info as this sample is from a prototype server, not released

shell

Interactive shell (same as running commands from command line)

# ipmitool shell
ipmitool> help
...

Commands

# ipmitool
No command provided!
Commands:
        raw           Send a RAW IPMI request and print response
        i2c           Send an I2C Master Write-Read command and print response
        spd           Print SPD info from remote I2C device
        lan           Configure LAN Channels
        chassis       Get chassis status and set power state
        power         Shortcut to chassis power commands
        event         Send pre-defined events to MC
        mc            Management Controller status and global enables
        sdr           Print Sensor Data Repository entries and readings
        sensor        Print detailed sensor information
        fru           Print built-in FRU and scan SDR for FRU locators
        gendev        Read/Write Device associated with Generic Device locators sdr
        sel           Print System Event Log (SEL)
        pef           Configure Platform Event Filtering (PEF)
        sol           Configure and connect IPMIv2.0 Serial-over-LAN
        tsol          Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
        isol          Configure IPMIv1.5 Serial-over-LAN
        user          Configure Management Controller users
        channel       Configure Management Controller channels
        session       Print session information
        sunoem        OEM Commands for Sun servers
        kontronoem    OEM Commands for Kontron devices
        picmg         Run a PICMG/ATCA extended cmd
        fwum          Update IPMC using Kontron OEM Firmware Update Manager
        firewall      Configure Firmware Firewall
        delloem       OEM Commands for Dell systems
        shell         Launch interactive IPMI shell
        exec          Run list of commands from file
        set           Set runtime variable for shell and exec
        hpm           Update HPM components using PICMG HPM.1 file
        ekanalyzer    run FRU-Ekeying analyzer using FRU files