ipmitool 参数详解和常用命令列举

发布时间 2023-09-19 10:52:17作者: 葫芦小金刚·

ipmitool 是一种可用在 linux 系统下的 ipmi 平台管理工具,它支持 ipmi 1.5 规范(最新的规范为 ipmi 2.0),通过它可以实现获取传感器的信息、显示系统日志内容、网络远程开关机等功能。

 

[root@localhost ~]# ipmitool -h

ipmitool version 1.8.18

usage: ipmitool [options...] <command>

       -h             This help

  *这个帮助信息

       -V             Show version information

  *显示版本信息

       -v             Verbose (can use multiple times)

  *详细(可以多次使用)

       -c             Display output in comma separated format

  *以逗号分隔格式显示输出

       -d N           Specify a /dev/ipmiN device to use (default=0)

  *指定要使用的/dev/ipmiN设备(默认值=0)

 

       -I intf        Interface to use

  *要使用的接口

 

       -H hostname    Remote host name for LAN interface

  *LAN接口的远程主机名

 

       -p port        Remote RMCP port [default=623]

*远程RMCP端口[默认值=623]

 

       -U username    Remote session username

*远程会话用户名

 

       -f file        Read remote session password from file

*从文件中读取远程会话密码

 

       -z size        Change Size of Communication Channel (OEM)

*改变通信渠道的规模(OEM)

 

       -S sdr         Use local file for remote SDR cache

*将本地文件用于远程SDR缓存

 

       -D tty:b[:s]   Specify the serial device, baud rate to use

                      and, optionally, specify that interface is the system one

*指定要使用的串行设备、波特率,并可选择指定接口为系统接口

 

       -4             Use only IPv4

*仅使用IPv4

 

       -6             Use only IPv6

*仅使用IPv6

 

       -a             Prompt for remote password

*提示输入远程密码

 

       -Y             Prompt for the Kg key for IPMIv2 authentication

*提示输入用于IPMIv2身份验证的Kg密钥

 

       -e char        Set SOL escape character

*设置SOL转义符

 

       -C ciphersuite  Cipher suite to be used by lanplus interface

*lanplus接口使用的密码套件

 

       -k key         Use Kg key for IPMIv2 authentication

*使用Kg密钥进行IPMIv2身份验证

 

       -y hex_key     Use hexadecimal-encoded Kg key for IPMIv2 authentication

*使用十六进制编码的Kg密钥进行IPMIv2身份验证

 

       -L level        Remote session privilege level [default=ADMINISTRATOR]

                     Append a '+' to use name/privilege lookup in RAKP1

*远程会话权限级别[默认值=ADMINISTRATOR],附加一个“+”以在RAKP1中使用名称/权限查找

 

       -A authtype    Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM

*强制使用身份验证类型NONE、PASSWORD、MD2、MD5或OEM

 

       -P password    Remote session password

*远程会话密码

 

       -E             Read password from IPMI_PASSWORD environment variable

*从IPMI_password环境变量读取密码

 

       -K             Read kgkey from IPMI_KGKEY environment variable

*从IPMI_kgkey环境变量读取kgkey

 

       -m address     Set local IPMB address

*设置本地IPMB地址

 

       -b channel     Set destination channel for bridged request

*设置桥接请求的目标通道

 

       -t address     Bridge request to remote target address

*桥接请求到远程目标地址

 

       -B channel     Set transit channel for bridged request (dual bridge)

*设置桥接请求的传输通道(双桥)

 

       -T address     Set transit address for bridge request (dual bridge)

*设置网桥请求的传输地址(双桥)

       -l lun         Set destination lun for raw commands

*为原始命令设置目标lun

 

       -o oemtype     Setup for OEM (use 'list' to see available OEM types)

*OEM设置(使用“列表”查看可用的OEM类型)

 

       -O seloem      Use file for OEM SEL event descriptions

*使用文件进行OEM SEL事件描述

 

       -N seconds     Specify timeout for lan [default=2] / lanplus [default=1] interface

*指定lan[默认值=2]/lanplus[默认值=1]接口的超时

 

       -R retry       Set the number of retries for lan/lanplus interface [default=4]

*设置lan/lanplus接口的重试次数[默认值=4]

 

Interfaces:

        open          Linux OpenIPMI Interface [default]

*Linux OpenIPMI接口[默认值]

 

        imb           Intel IMB Interface

*英特尔IMB接口

 

        lan           IPMI v1.5 LAN Interface

*IPMI v1.5 LAN接口

 

        lanplus       IPMI v2.0 RMCP+ LAN Interface

*IPMI v2.0 RMCP+LAN接口

 

        serial-terminal  Serial Interface, Terminal Mode

*串行接口,终端模式

 

        serial-basic  Serial Interface, Basic Mode

*串行接口,基本模式

 

        usb           IPMI USB Interface(OEM Interface for AMI Devices)

*IPMI USB接口(用于AMI设备的OEM接口)

 

Commands:

        raw           Send a RAW IPMI request and print response

*发送RAW IPMI请求和打印响应

 

        i2c           Send an I2C Master Write-Read command and print response

*发送I2C主机写-读命令和打印响应

 

        spd           Print SPD info from remote I2C device

*从远程I2C设备打印SPD信息

 

        lan           Configure LAN Channels

*配置LAN通道

 

        chassis       Get chassis status and set power state

*获取机箱状态并设置电源状态

 

        power         Shortcut to chassis power commands

*机箱电源命令的快捷方式

 

        event         Send pre-defined events to MC

*向MC发送预定义事件

 

        mc            Management Controller status and global enables

*Management Controller状态和全局启用

 

        sdr           Print Sensor Data Repository entries and readings

*打印传感器数据存储库条目和读数

 

        sensor        Print detailed sensor information

*打印详细的传感器信息

 

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

*打印内置FRU并扫描SDR以查找FRU定位器

 

        gendev        Read/Write Device associated with Generic Device locators sdr

*与通用设备定位器sdr关联的读/写设备

 

        sel           Print System Event Log (SEL)

*打印系统事件日志(SEL)

 

        pef           Configure Platform Event Filtering (PEF)

*配置平台事件筛选(PEF)

 

        sol           Configure and connect IPMIv2.0 Serial-over-LAN

*配置和连接LAN上的IPMIv2.0串行

 

        tsol          Configure and connect with Tyan IPMIv1.5 Serial-over-LAN

*通过局域网配置和连接Tyan IPMIv1.5串行

 

        isol          Configure IPMIv1.5 Serial-over-LAN

*配置LAN上的IPMIv1.5串行

 

        user          Configure Management Controller users

*配置Management Controller用户

 

        channel       Configure Management Controller channels

*配置Management Controller通道

 

        session       Print session information

*打印会话信息

 

        dcmi          Data Center Management Interface

*数据中心管理界面

 

        nm            Node Manager Interface

*节点管理器界面

 

        sunoem        OEM Commands for Sun servers

*用于Sun服务器的OEM命令

 

        kontronoem    OEM Commands for Kontron devices

*Kontron设备的OEM命令

 

        picmg         Run a PICMG/ATCA extended cmd

*运行PICMG/ATCA扩展命令

 

        fwum          Update IPMC using Kontron OEM Firmware Update Manager

*使用Kontron OEM固件更新管理器更新IPMC

 

        firewall      Configure Firmware Firewall

*配置固件防火墙

 

        delloem       OEM Commands for Dell systems

*用于Dell系统的OEM命令

 

        shell         Launch interactive IPMI shell

*启动交互式IPMI外壳

 

        exec          Run list of commands from file

*从文件运行命令列表

 

        set           Set runtime variable for shell and exec

*为shell和exec设置运行时变量

 

        hpm           Update HPM components using PICMG HPM.1 file

*使用PICMG HPM.1文件更新HPM组件

 

        ekanalyzer    run FRU-Ekeying analyzer using FRU files

*使用FRU文件运行FRU Ekeying分析器

 

        ime           Update Intel Manageability Engine Firmware

*更新英特尔可管理性引擎固件

 

        vita          Run a VITA 46.11 extended cmd

*运行VITA 46.11扩展命令

 

        lan6          Configure IPv6 LAN Channels

*配置IPv6 LAN通道

 

常用命令

  • 查询IPMI用户数据库摘要信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd user summary

 

  • 列出BMC的全部用户信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd user list

 

  • 打印LAN接口参数配置信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd lan print 1

 

  • IPMI SOL参数信息查询

ipmitool -H $device_ip -I lanplus -U $username -P $passwd sol info

 

  • KVM over IP

ipmitool -H $device_ip -I lanplus -U $username -P $passwd sol activate

 

  • 获取BMC相关信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd mc info

 

  • IPMI远程开机

ipmitool -H $device_ip -I lanplus -U $username -P $passwd power on

 

  • IPMI远程关机

ipmitool -H $device_ip -I lanplus -U $username -P $passwd power off

 

  • IPMI远程复位

ipmitool -H $device_ip -I lanplus -U $username -P $passwd power reset

 

  • 通过IPMI获取设备FRU信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd fru list

 

  • 通过IPMI获取整机功耗

ipmitool -H $device_ip -I lanplus -U $username -P $passwd raw 0x30 0x93 0xdb 0x07 0x00 0x11 0x00

 

  • 获取SDR相关信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd sdr list

 

  • 显示SEL相关信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd sel list

 

  • 查询SEL日志信息

ipmitool -H $device_ip -I lanplus -U $username -P $passwd sel info