IPMI (Intelligent Platform Management Interface)

4.3. ipmitool - utility for controlling IPMI-enabled devices

4.3.1. ipmitool

4.3.1.1. ubuntu

确定硬件是否支持 IPMI

[email protected]:~$ sudo dmidecode |grep -C 5 IPMI
[sudo] password for neo:
Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

Handle 0x2600, DMI type 38, 18 bytes
IPMI Device Information
        Interface Type: KCS (Keyboard Control Style)
        Specification Version: 2.0
        I2C Slave Address: 0x10
        NV Storage Device: Not Present
        Base Address: 0x0000000000000CA8 (I/O)
sudo apt-get install openipmi

sudo apt-get install ipmitool

sudo mkdir -p /var/lock/subsys/ipmi

$ sudo /etc/init.d/openipmi start
 * Starting ipmi drivers                  [ OK ]

4.3.1.2. CentOS

# yum search ipmi
========================================== Matched: ipmi ===========================================
OpenIPMI.x86_64 : OpenIPMI (Intelligent Platform Management Interface) library and tools
OpenIPMI-devel.i386 : The development environment for the OpenIPMI project.
OpenIPMI-devel.x86_64 : The development environment for the OpenIPMI project.
OpenIPMI-gui.x86_64 : IPMI graphical user interface tool
OpenIPMI-libs.i386 : The OpenIPMI runtime libraries
OpenIPMI-libs.x86_64 : The OpenIPMI runtime libraries
OpenIPMI-perl.x86_64 : OpenIPMI Perl language bindings
OpenIPMI-python.x86_64 : OpenIPMI Python language bindings
OpenIPMI-tools.x86_64 : OpenIPMI utilities and scripts from ipmitool
collectd-ipmi.x86_64 : IPMI module for collectd
freeipmi.i386 : FreeIPMI
freeipmi.x86_64 : FreeIPMI
freeipmi-bmc-watchdog.x86_64 : FreeIPMI BMC watchdog
freeipmi-devel.i386 : Development package for FreeIPMI
freeipmi-devel.x86_64 : Development package for FreeIPMI
freeipmi-ipmidetectd.x86_64 : IPMI node detection monitoring daemon
openhpi.i386 : openhpi Hardware Platform Interface (HPI) library and tools
openhpi.x86_64 : openhpi Hardware Platform Interface (HPI) library and tools
ripmime.x86_64 : Extract attachments out of a MIME encoded email packages
watchdog.x86_64 : Software and/or Hardware watchdog daemon

# yum install OpenIPMI OpenIPMI-tools -y
				

4.3.2. sensor

# ipmitool -I open sensor list
			

4.3.3. ipmitool shell

# ipmitool shell
			

mc info

ipmitool> mc info
Device ID                 : 32
Device Revision           : 0
Firmware Revision         : 1.54
IPMI Version              : 2.0
Manufacturer ID           : 674
Manufacturer Name         : DELL Inc
Product ID                : 256 (0x0100)
Product Name              : Unknown (0x100)
Device Available          : yes
Provides Device SDRs      : yes
Additional Device Support :
    Sensor Device
    SDR Repository Device
    SEL Device
    FRU Inventory Device
    IPMB Event Receiver
    Bridge
    Chassis Device
Aux Firmware Rev Info     :
    0x00
    0x0f
    0x00
    0x00

ipmitool> lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5
                        : User     : MD2 MD5
                        : Operator : MD2 MD5
                        : Admin    : MD2 MD5
                        : OEM      :
IP Address Source       : Static Address
IP Address              : 172.16.1.132
Subnet Mask             : 255.255.255.0
MAC Address             : 84:2b:2b:fd:e2:51
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP      : 172.16.1.254
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM

4.3.4. ipmitool 访问远程主机

# ipmitool -H 172.16.1.155 -U root -P 123456 lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5
                        : User     : MD2 MD5
                        : Operator : MD2 MD5
                        : Admin    : MD2 MD5
                        : OEM      :
IP Address Source       : Static Address
IP Address              : 172.16.1.15
Subnet Mask             : 255.255.255.0
MAC Address             : 84:2b:2b:fc:fb:cc
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP      : 172.16.1.254
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM

4.3.5. Get chassis status and set power state

# ipmitool -I open chassis
Chassis Commands:  status, power, identify, policy, restart_cause, poh, bootdev, bootparam, selftest

# ipmitool -I open chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : previous
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  : allowed
Reset Button Disable : not allowed
Power Button Disable : allowed
Sleep Button Disabled: false
Diag Button Disabled : true
Reset Button Disabled: false
Power Button Disabled: false

4.3.6. Configure Management Controller

4.3.6.1. Management Controller status and global enables

# ipmitool -I open mc
MC Commands:
  reset <warm|cold>
  guid
  info
  watchdog <get|reset|off>
  selftest
  getenables
  setenables <option=on|off> ...
    recv_msg_intr         Receive Message Queue Interrupt
    event_msg_intr        Event Message Buffer Full Interrupt
    event_msg             Event Message Buffer
    system_event_log      System Event Logging
    oem0                  OEM 0
    oem1                  OEM 1
    oem2                  OEM 2

4.3.6.2. Configure LAN Channels

ipmitool -I open lan print 1                           	显示BMC通道的信息,如果不知道BMC使用的是哪个通道,请使用下面的命令确认:
ipmitool -I open channel info 1
ipmitool -I open lan set 1 ipsrc static                	设置本地BMC地址为静态,才能设置IP
ipmitool -I open lan set 1 ipaddr 172.16.0.2         	设置本地BMC的IP地址
ipmitool -I open lan set 1 netmask 255.255.255.0       	子网掩码,别忘了设
ipmitool -I open lan set 1 defgw ipaddr 172.16.0.254   	网关,可设可不设,不过一定要确保监控它的机器位于同一路由
				

4.3.6.3. Configure Management Controller users

ipmitool user list 1     			查看BMC的用户列表
ipmitool user set name 1 username 	对BMC的1号用户设置用户名username
ipmitool user set password 1 123456 对BMC的1号用户设置密码123456

4.3.6.4. Configure Management Controller channels

# ipmitool -I open channel info 1
Channel 0x1 info:
  Channel Medium Type   : 802.3 LAN
  Channel Protocol Type : IPMB-1.0
  Session Support       : multi-session
  Active Session Count  : 0
  Protocol Vendor ID    : 7154
  Volatile(active) Settings
    Alerting            : disabled
    Per-message Auth    : disabled
    User Level Auth     : enabled
    Access Mode         : always available
  Non-Volatile Settings
    Alerting            : disabled
    Per-message Auth    : disabled
    User Level Auth     : enabled
    Access Mode         : always available
				

4.3.7. Example for iDRAC

http://support.dell.com/support/edocs/software/smbmcmu/bmcmu_4_0/cs/ug/bmcugc0d.htm#wp1067804

4.3.7.1. 更改IP地址,子网掩码与网关

查看IP,子网掩码与网关

# ipmitool -I open lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5
                        : User     : MD2 MD5
                        : Operator : MD2 MD5
                        : Admin    : MD2 MD5
                        : OEM      :
IP Address Source       : Static Address
IP Address              : 172.16.5.23
Subnet Mask             : 255.255.255.0
MAC Address             : 18:03:73:f5:ee:82
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP      : 172.16.5.254
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
				

设置IP,子网掩码与网关

/usr/bin/ipmitool -I open lan set 1 ipaddr 172.16.8.200
/usr/bin/ipmitool -I open lan set 1 netmask 255.255.255.0
/usr/bin/ipmitool -I open lan set 1 defgw ipaddr 172.16.8.254
/usr/bin/ipmitool -I open lan set 1 access on
				

4.3.7.2. 更改 iDRAC LCD 显示屏

# ipmitool delloem lcd set mode userdefined test
# ipmitool delloem lcd info
LCD info
    Setting: User defined
    Text:    test
				

4.3.7.3. 更改 iDRAC 密码

# ipmitool user list 2
ID  Name	     Callin  Link Auth	IPMI Msg   Channel Priv Limit
2   root             true    true       true       ADMINISTRATOR
# ipmitool user set password 2 "mypasswd"
				

4.3.7.4. 关机/开机

服务器关机
#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power off

服务器开机
#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power on

服务器 reset
#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power reset
				

4.3.7.5. 启动列表

ipmitool -I lan -H 10.10.0.5 -U ADMIN -P ADMIN chassis bootdev pxe
				
时间: 2024-08-08 22:05:40

IPMI (Intelligent Platform Management Interface)的相关文章

Ethernet Management Interface VRF

New Cisco Routers and Switches come with a dedicated Ethernet port which unique purpose is to provide management access to the device via SSH or Telnet. This interface is isolated in its own VRF called "Mgmt-vrf'. Placing the management Ethernet inte

监控详解及zabbix简介

监控主要功能 设备样本数据采集 告警:短信.微信.电话.邮件,并能实现告警升级: 生成图型趋势 存储监控数据 任何未被监控的系统都不得上线:nagios图形处理较弱,不存储数据,告警能力强大:catia有强大的图形处理和数据存储,但告警太弱: Zabbix就是集合nagios和cacia的功能,并有及其强大的告警功能: 监控主要监控哪些? 1.设备及软件 服务器.路由器.交换机.存储设备: 操作系统.网络.应用程序: 2.事件 DB down,Replication stopped,Server

linux服务大全

NetworkManager为了自动连接网络的服务      ■ x对于服务器而言没用 acpid            电源的on/off等的监视/管理 ■ x 理由同上anacron          一种计划任务管理          ■ ○ apmd            电源管理                  ■ ○ atd              在指定时间执行命令 ■ x 如果用crond,就可以不用它auditd           检查demo         ■ △ 如

使用 ipmitool 实现 Linux 系统下对服务器的 ipmi 管理

http://www.ibm.com/developerworks/cn/linux/l-ipmi/ 1.简介 IPMI(Intelligent Platform Management Interface)即智能平台管理接口是使硬件管理具备“智能化”的新一代通用接口标准.用户可以利用 IPMI 监视服务器的物理特征,如温度.电压.电扇工作状态.电源供应以及机箱入侵等.Ipmi 最大的优势在于它是独立于 CPU BIOS 和 OS 的,所以用户无论在开机还是关机的状态下,只要接通电源就可以实现对服

IPMI设置与使用(远程控制服务器)

如果服务器crash了或者就hang住了,我们不必要跑到机房去按电源键的,因为我们也想“运筹帷幄之中,决胜千里之外”嘛.我们可以用IPMI,它可以让我们远程用一条命令开启(关闭.重启)一台服务器,也可以检查服务器的状态. IPMI简介:from wikipedia The Intelligent Platform Management Interface (IPMI) is a standardized computer system interface used by system admin

集群监控之 —— ipmi操作指南

http://blog.csdn.net/yunsongice/article/details/5408802 智能平台管理界面(IPMI,Intelligent Platform Management Interface)是管理基于 Intel结构的企业级系统中所使用的外围设备采用的一种工业标准,用户能够利用IPMI监控服务器的物理健康特征,如温度.电压.风扇工作状态.电源状态等.该标准由美国英特尔.惠普(Hewlett-Packard).NEC.美国戴尔电脑和SuperMicro等公司定制.

Linux下使用命令行配置IPMI

ipmitool是什么: 百度百科给的解释已经够用了,简单说就是“IPMI(Intelligent Platform Management Interface)即智能平台管理接口是使硬件管理具备“智能化”的新一代通用接口标准.用户可以利用 IPMI 监视服务器的物理特征,如温度.电压.电扇工作状态.电源供应以及机箱入侵等. IPMI配置管理IP方法有: 1.BIOS配置,这个简单,直接开机进BIOS,在进阶选项里配置IPMI的IP,掩码,网关. 2.开机过程中,按照提示,按ctrl + E 进入

ipmi介绍和使用

IPMI 是什么 IPMI 工作原理 IPMI 能干嘛 IPMI Functionality Side-Band and Out-of-Band 利用ipmi可以实现以下功能 IPMI 怎么做 注意 服务器端 设置 客户端 设置 本地操作系统里操作 远程操作 IPMI 是什么? The Intelligent Platform Management Interface (IPMI) specification is an Intel led standard which defines a se

Xen KVM虚拟化ipmi错误答案

问题说明: 用DEll R720服务器安装xen,kvm服务.创建好guest并启动,进入系统,系统运行都没问题,不过开机的时候发现一个failed提示,如下 Xen DomU启动中提示 # dmesg | grep PCIPCI: Warning: Cannot find a gap in the 32bit address rangePCI: Unassigned devices with 32bit resource registers may break!Allocating PCI r