BMC IPMI
常用命令
BMC(Baseboard Management Controler)
提供了多种通道来和主机通信,进而检测主机的温度、风扇转速、电压、电源和现场可替代器件。为了便于用户使用,它提供了非常丰富的命令,下面介绍一下主要的常用命令。
1.
远程电源控制类
Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power off
Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power on
Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power reset
Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power cycle
(
注意power cycle
和power reset
的区别在于前者从掉电到上电有1秒钟的间隔,而后者是很快上电)
2.
读取系统状态类
Ipmitool sensor list
显示系统所有传感器列表
Ipmitool fru list
显示系统所有现场可替代器件的列表
Ipmitool sdr list
显示系统所有SDRRepository设备列表
Ipmitool pef list 显示系统平台时间过滤的列表
3.
系统日志类
Ipmitool sel elist
显示所有系统事件日志
Ipmitool sel clear
删除所有系统时间日志
Ipmitool sel delete ID
删除第ID
条SEL
Ipmitool sel time get
显示当前BMC
的时间
Ipmitool sel time set XXX
设置当前BMC
的时间
4.
启动设置类
Ipmitool chassis bootdev bios
重启后停在BIOS
菜单
Ipmitool chassis bootdev pxe
重启后从PXE
启动
5.
系统相关的命令
Ipmitool mc info
显示BMC
版本信息
Ipmitool bmc reset cold BMC
热启动
Ipmitool bmc reset warmBMC
冷启动
6.
网络接口相关命令
Ipmitool lan print 1
显示channel1
的网络配置信息
Ipmitool lan set 1ipaddr 10.32.2.2
设置channel1
的IP
地址
Ipmitool lan set 1 netmask 255.255.0.0
设置channel1
的netmask
Ipmitool lan set 4 defgw ipaddr255.255.0.254
设置channel4
的网关
Ipmitool lan set 2 defgw macaddr
设置channel2的网关mac address
Ipmitool lan set 2 ipsrc dhcp 设置channel2的ip 源在DHCP
Ipmitool lan set 3 ipsrc static 设置channel2的ip是静态获得的
7. 通道相关命令
Ipmitool channel info 显示系统默认channel
Ipmitool channel authcap channel-number privilege 修改通道的优先级别
Ipmitool channel getaccess channel-number user-id 读取用户在通道上的权限
Ipmitool channel setacccess channel-number user-id callin=on ipmi=on link=onprivilege=5 // 设置用户在通道上的权限
8. 看门狗相关命令
Ipmitool mc watchdog get 读取当前看门狗的设置
Ipmitool watchdog off 关掉看门狗
Ipmitool watchdog reset 在最近设置的计数器的基础上重启看门狗
9. 用户管理相关命令
Ipmitool user list chan-id 显示某通道上的所有用户
Ipmitool set password [] 修改某用户的密码
Ipmitool disable 禁止掉某用户
ipmitool enable 使能某用户
ipmitool priv [] 修改某用户在某通道上的权限
ipmitool test <16|20>[ 测试用户