4.3. ipmitool - utility for controlling IPMI-enabled devices

4.3.1. ipmitool

4.3.1.1. ubuntu

确定硬件是否支持 IPMI

neo@monitor:~$ 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
				

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

  1. Desktop Management Interface & System Management BIOS

    http://en.wikipedia.org/wiki/Desktop_Management_Interface Desktop Management Interface From Wikipedi ...

  2. Can't access RabbitMQ web management interface after fresh install

    http://stackoverflow.com/questions/22850546/cant-access-rabbitmq-web-management-interface-after-fres ...

  3. PXE,ipmi,bare metal

    IPMI(Intelligent Platform Management Interface)是一个智能平台管理接口. 用户可以利用IPMI 监视服务器等设备的物理特征,如各部件的温度.电压.风扇工作 ...

  4. 远程控制卡 使用ipmitools设置ipmi

    远程控制卡 使用ipmitools设置ipmi 使用DELL的远程控制卡可以方便的管理服务器 在CentOS中可以使用ipmitools管理 IPMI( Intelligent Platform Ma ...

  5. ZZ:Solaris 10 软件包分析

    ZZ:Solaris 10 软件包分析 http://blog.chinaunix.net/uid-22759617-id-276756.html # Last updated: 2006-02-14 ...

  6. IPMITool driver

    官网链接: https://docs.openstack.org/ironic/latest/admin/drivers/ipmitool.html IPMITool driver 概述IPMI(In ...

  7. intel 82599网卡(ixgbe系列)术语表

    Intel® 82599 10 GbE Controller Datasheet 15.0 Glossary and Acronyms 术语表 缩写 英文解释 中文解释 1 KB A value of ...

  8. 【网络——Linux】——IPMI详细介绍【转】

    一.IPMI含义 智能平台管理接口(IPMI:Intelligent Platform Management Interface)是一项应用于服务器管理系统设计的标准,由Intel.HP.Dell和N ...

  9. Zabbix通过IPMI监控HPE服务器硬件

    IPMI是智能型平台管理接口(Intelligent Platform Management Interface)的缩写,是管理基于 Intel结构的企业系统中所使用的外围设备采用的一种工业标准,该标 ...

随机推荐

  1. c++类成员函数重载常量与非常量版本时避免代码重复的一种方法

    c++有时候需要为类的某个成员函数重载常量与非常量的版本,定义常量版本是为了保证该函数可作用于常量类对象上,并防止函数改动对象内容.但有时两个版本的函数仅仅是在返回的类型不同,而在返回前做了大量相同的 ...

  2. 最大流之dinic

    先用bfs预处理出层次图,然后在层次图上用dfs找增广路径,理论复杂度O(n*n*m) const int INF=0xfffffff ; struct node { int s,t,cap,nxt ...

  3. IO的概念

    什么是IO: 在内存中存在数据交换的操作都可以认为是IO操作 和终端交互:input print 和磁盘交互:read write 和网络交互:recv send IO密集型程序:在程序执行过程中存在 ...

  4. 片段的findFragmentById

    class类名 名字 = calss类名 getFragmentManager().findFragmentById(R.id.布局id) 因为需要获取到片段的管理者,才可以去寻找到相应的布局.

  5. 20165212实验三——敏捷开发与XP实践

    20165212实验三 敏捷开发与XP实践 实验内容 XP基础 XP核心实践 相关工具 实验知识点总结 (一)敏捷开发与XP 软件工程:把系统的.有序的.可量化的方法应用到软件的开发.运营和维护上的过 ...

  6. (转)关于fflush(stdin)清空输入缓存流(C/C++)

    来源:http://my.oschina.net/deanzhao/blog/79790 1. 为什么 fflush(stdin) 是错的?首先请看以下程序: #include <stdio.h ...

  7. [CF1016G]Appropriate Team

    codeforces description 给你一个数组\(\{a_i\}\)以及\(X,Y\),问你有多少对\((i,j)\)满足存在一个\(v\in \mathbb{N}^+\)使得 \(\gc ...

  8. C#对象的三种序列化

    要让一个对象支持.Net序列化服务,用户必须为每一个关联的类加上[Serializable]特性.如果类中有些成员不适合参与序列化(比如:密码字段),可以在这些域前加上[NonSerialized]特 ...

  9. 2019第十届蓝桥杯C/C++

    这是我第一次参加蓝桥杯比赛,比完后,有点低于预期,自己的发挥低于预期,赛事水准也低于预期. 教室里面很多同学的电脑出现问题,举办学校也没有完善的应急方案,有一部分同学11点钟才可以做题. 附题目pdf ...

  10. Building a Simple User Interface(创建一个简单的用户界面)

    对于一个android 应用程序,用户的图形界面通常是由View(视图)和ViewGroup(视图组)对象构成的层次结构. View(视图)对象通常是按钮或文本输入框这类UI小部件,ViewGroup ...