啓動ipmi驅動
# /etc/init.d/ipmi start
查看用戶ID列表
# ipmitool user list 1
啓動停用用戶
# ipmitool user disable 1
# ipmitool user enable 1
配置IPMI
# ipmitool user set name 2 SinoCache
# ipmitool user set password 2 'IPMIZz0OoNGAA'
# ipmitool user priv 2 4 1 && ipmitool user list 1
# ipmitool lan set 1 ipaddr 10.10.217.72
# ipmitool lan set 1 netmask 255.255.0.0
# ipmitool lan set 1 defgw ipaddr 10.10.217.1
# ipmitool lan set 1 access on
重啓IPMI服務
# ipmitool mc reset cold
查看本機IPMI狀態
# ipmitool lan print
[root@CN-LF-LZ2-326 ~]# ipmitool lan print 1
Set in Progress : Set Complete
IP Address Source : Static Address
IP Address : 172.30.68.28
Subnet Mask : 255.255.255.0
MAC Address : a4:dc:be:14:71:99
SNMP Community String : ******
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control : ARP Responses Disabled, Gratuitous ARP Disabled
Default Gateway IP : 172.30.68.254
802.1q VLAN ID : Disabled
RMCP+ Cipher Suites : 0,1,2,3
Cipher Suite Priv Max : XuuaXXXXXXXXXXX
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
操作遠程主機
硬關機,直接切斷電源:
# ipmitool -I lan -H 服務器地址 -U root -P 密碼 power off
軟關機,即如同輕按一下開機按鈕:
# ipmitool -I lan -H 服務器地址 -U root -P 密碼 power soft
硬開機:
# ipmitool -I lan -H 服務器地址 -U root -P 密碼 power on
硬重啓 (這個你也許經常用到):
# ipmitool -I lan -H 服務器地址 -U root -P 密碼 power reset
獲取當前電源狀態:
# ipmitool -I lan -H 服務器地址 -U root -P 密碼 power status
備註(有些服務器要使用 -I lanplus)
服務器查看服務標籤
查看服務標籤:
# dmidecode -t1
查看uuid:
# dmidecode -s system-uuid
查看狀態信息:
# ipmitool chassis status