ipmitool –I open sensor list #命令可以获取传感器中的各种监测值和该值的监测阈值,包括(CPU温度,电压,风扇转速,电源调制模块温度,电源电压等信息。 ipmitool –I open sensor thresh #设置ID值等于id的监测项的各种限制值。 ipmitool –I open chassis status #查看底盘状态,其中包括了底盘电源信息,底盘工作状态等 ipmitool –I open chassis restart_cause #查看上次系统重启的原因
#远程电源管理
1 2 3 4 5 6 7
ipmitool -I lanplus -H $oob_ip -U root -P 密码 power off (硬关机,直接切断电源) ipmitool -I lanplus -H $oob_ip -U root -P 密码 power soft (软关机,即如同轻按一下开机按钮) ipmitool -I lanplus -H $oob_ip -U root -P 密码 power on (硬开机) ipmitool -I lanplus -H $oob_ip -U root -P 密码 power reset (硬重启) ipmitool -I lanplus -H $oob_ip -U root -P 密码 power status (获取当前电源状态) ipmitool -I lanplus -H $oob_ip -U root -P 密码 chassis power cycle (注意power cycle 和power reset的区别在于前者从掉电到上电有1秒钟的间隔,而后者是很快上电)
#远程引导(当次生效)
1 2 3
ipmitool -I lan -H 服务器地址 -U root -P passwd chassis bootdev pxe (网络引导) ipmitool -I lan -H 服务器地址 -U root -P passwd chassis bootdev disk (硬盘引导) ipmitool -I lan -H 服务器地址 -U root -P passwd chassis bootdev cdrom (光驱引导)
#读取系统状态类
1 2 3 4
ipmitool sensor list #显示系统所有传感器列表 ipmitool fru list #显示系统所有现场可替代器件的列表 ipmitool sdr list #显示系统所有SDRRepository设备列表 ipmitool pef list #显示系统平台时间过滤的列表
#系统日志类
1 2 3 4 5
ipmitool sel elist #显示所有系统事件日志 ipmitool sel clear #删除所有系统时间日志 ipmitool sel delete ID #删除第ID条SEL ipmitool sel time get #显示当前BMC的时间 ipmitool sel time set XXX #设置当前BMC的时间
ipmitool mc info #显示BMC版本信息 ipmitool bmc reset cold #BMC 热启动 ipmitool bmc reset warmBMC #冷启动
#网络接口相关命令
1 2 3 4 5 6 7
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 <macaddr> #设置channel2的网关mac address ipmitool lan set 2 ipsrc dhcp #设置channel2的ip 源在DHCP ipmitool lan set 3 ipsrc static #设置channel2的ip是静态获得的