ipmitool支持IPMI-over-LAN和系统Kernel中的设备驱动(openIPMI in Linux, BMC in Solaris, openIPMI in FreeBSD) 接口。即可以本地运行,也可以在远程机器上运行,实现对服务器主机的管理和控制。
系统管理命令
管理类
查看设备信息
1 2 3 4 5 6 7 8 9 10 11 12
[root@hyhive ~]# ipmitool 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
查看BMC的信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[root@hyhive ~]# ipmitool mc info Device ID : 32 Device Revision : 1 Firmware Revision : 3.45 IPMI Version : 2.0 Manufacturer ID : 10876 Manufacturer Name : Supermicro Product ID : 2097 (0x0831) Product Name : Unknown (0x831) Device Available : yes Provides Device SDRs : no Additional Device Support : Sensor Device SDR Repository Device SEL Device FRU Inventory Device IPMB Event Receiver IPMB Event Generator Chassis Device
查看IPMI用户
1 2 3
[root@hyhive ~]# ipmitool user list ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN true false false Unknown (0x00)
增加用户
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[root@hyhive ~]# ipmitool user set name 3 test1 [root@hyhive ~]# ipmitool user list ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN true false false Unknown (0x00) 3 test1 true false false Unknown (0x00) [root@hyhive ~]# ipmitool user set password 3 test1 [root@hyhive ~]# ipmitool user priv 3 20 [root@hyhive ~]# ipmitool user list ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN true false false Unknown (0x00) 3 test1 true false false ADMINISTRATOR [root@hyhive ~]# ipmitool -U test1 -P test1 user list ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN true false false Unknown (0x00) 3 test1 true false false ADMINISTRATOR
重设密码
1 2
[root@hyhive ~]# ipmitool user set password 2 ADMIN ## 2指的是user ID,ADMIN指的是之后的密码
远程电源控制类
查看服务器当前开电状态
1 2
[root@hyhive ~]# ipmitool power status Chassis Power is on
服务器的开机,关机,reset和power cycle
1 2
[root@hyhive ~]# ipmitool power chassis power Commands: status, on, off, cycle, reset, diag, soft
power cycle 和power reset的区别在于前者从掉电到上电有1秒钟的间隔,而后者是很快上电
[root@hyhive ~]# ipmitool sdr list CPU1 Temp | 44 degrees C | ok CPU2 Temp | 45 degrees C | ok PCH Temp | 49 degrees C | ok System Temp | 34 degrees C | ok Peripheral Temp | 49 degrees C | ok Vcpu1VRM Temp | 46 degrees C | ok Vcpu2VRM Temp | 47 degrees C | ok VmemABVRM Temp | 36 degrees C | ok VmemCDVRM Temp | 39 degrees C | ok VmemEFVRM Temp | 48 degrees C | ok VmemGHVRM Temp | 41 degrees C | ok P1-DIMMA1 Temp | 36 degrees C | ok P1-DIMMB1 Temp | 36 degrees C | ok P1-DIMMC1 Temp | 41 degrees C | ok P1-DIMMD1 Temp | 39 degrees C | ok P2-DIMME1 Temp | 43 degrees C | ok P2-DIMMF1 Temp | 41 degrees C | ok P2-DIMMG1 Temp | 37 degrees C | ok P2-DIMMH1 Temp | 37 degrees C | ok FAN1 | no reading | ns FAN2 | 3100 RPM | ok FAN3 | 3000 RPM | ok FAN4 | 3100 RPM | ok FAN5 | 3200 RPM | ok FAN6 | 3100 RPM | ok FANA | no reading | ns FANB | no reading | ns 12V | 12.19 Volts | ok 5VCC | 5.05 Volts | ok 3.3VCC | 3.40 Volts | ok VBAT | 2.90 Volts | ok Vcpu1 | 1.82 Volts | ok Vcpu2 | 1.82 Volts | ok VDIMMAB | 1.21 Volts | ok VDIMMCD | 1.21 Volts | ok VDIMMEF | 1.22 Volts | ok VDIMMGH | 1.21 Volts | ok 5VSB | 5.03 Volts | ok 3.3VSB | 3.25 Volts | ok 1.5V PCH | 1.52 Volts | ok 1.2V BMC | 1.23 Volts | ok 1.05V PCH | 1.07 Volts | ok Chassis Intru | 0x00 | ok PS2 Status | 0x01 | ok PS1 Status | 0x01 | ok
显示系统可替代器件列表
1 2 3 4 5 6
[root@hyhive ~]# ipmitool fru list FRU Device Description : Builtin FRU Device (ID 0) Board Mfg Date : Mon Jan 1 08:00:00 1996 Board Mfg : Supermicro Board Serial : Product Serial :