ipmitool命令 CentOS 6.x系统安装ipmitool工具
# yum install OpenIPMI OpenIPMI-devel OpenIPMI-tools -y
1
启动ipmi驱动
# /etc/init.d/ipmi start
1
查看用户ID列表
# ipmitool user list 1
1
启动停用用户
# ipmitool user disable 1 # ipmitool user enable 1
1 2
配置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
1 2 3 4 5 6 7 8
重启IPMI服务
# ipmitool mc reset cold
1
查看本机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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
ipmitool远程控制 操作远程主机
硬关机,直接切断电源: # 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)
1 2 3 4 5 6 7 8 9 10 11 12
服务器查看服务标签
查看服务标签: # dmidecode -t1 查看uuid: # dmidecode -s system-uuid 查看状态信息: # ipmitool chassis status
ipmitool user set password 2 xxxxx ipmitool user set name 2 admin 这个就是把第二个名字修改为admin
|