##ipmitool 智能平台管理接口 bmc节点管理工具 yum install -y ipmitool #linux需要加载核心 modprobe ipmi_watchdog modprobe ipmi_poweroff modprobe ipmi_msghandler modprobe ipmi_devintf modprobe ipmi_si #通信验证 ipmitool raw 6 1 #bmc版本 ipmitool mc info # 温和重启(推荐先尝试) sudo ipmitool mc reset warm # 强制冷重启(更彻底,仅当 warm 无效时使用) sudo ipmitool mc reset cold #查看bmc地址 ipmitool lan print #修改密码 ipmitool user set password 2 superuser #修改密码为ADMIN ADMIN ipmicfg -fd 3 #修改用户1 root 的密码为 abcdefg ipmitool user set password 1 abcdefg #修改fru信息 ipmitool fru edit 0 field
"修改值" #远程登录 ipmitool -H (BMC的管理IP地址) -I lanplus -U (BMC登录用户名) -P (BMC 登录密码) raw 6 1 #发送raw 0x06 0x46 0x02 返回61/41 64 6d 69 6e 00 00 00 00 00 00 00 00 00 00 00(admin/Admin) ipmitool.exe -H 192.168.0.200 -I lanplus -U root -P 0penBmc raw 0x06 0x46 0x02 ipmitool -H 192.168.1.40 -I lanplus -U admin -P admin@123 sel elist #更改开机boot启动方式 ipmitool chassis bootdev pxe ipmitool chassis bootdev disk ipmitool -H 192.168.1.151 -I lanplus -U admin -P admin chassis bootdev ipmitool chassis bootdev pxe options=efiboot ipmitool chassis bootparam get 5 设置启动模式: ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U xxxx -P xxxx chassis bootdev pxe 重启(不能OS用reboot启动,不然PXE启动无效): ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U xxxx -P xxxx power reset #查看开关机状态 开机 关机 重启 ipmitool power status ipmitool power on ipmitool power off ipmitool power reset for i in {1..10} do ipmitool -H 192.168.1.234 -I lanplus -U admin -P admin power reset sleep 300 done #用户列表 新增 改密 改权 禁用 ipmitool user list [ChannelNo] ipmitool user set name ipmitool user set password ipmitool user priv [ChannelNo] ipmitool user enable/disable #网络 查看 修改 channel 1是网络 ipmitool lan print [ChannelNo] ipmitool lan set ipsrc ipmitool lan set ipaddr ipmitool lan set netmask ipmitool lan set defgw ipaddr <默认网关> #查看FRU信息 查看SEL日志 查看Sensor信息 查看SDR Sensor信息 电源信息 ipmitool fru list ipmitool sel list ipmitool sensor list ipmitool sdr ipmitool sdr type "power supply" #SOL 打开 关闭 ipmitool sol activate ipmitool sol deactivate #禁用用户2 ipmitool sol payload disable 1 2 ipmitool sol payload enable 1 2 ipmitool channel info 1 ipmitool channel info 6 #抓取sol ipmitool -I lanp -H 192.168.1.22 -U admin -P admin sol activate | tee sol.log #fru ipmitool -I lan -H -U -P fru write 0 fru.bin #导出 ipmitool fru read 0 fru.bin #导入 ipmitool fru write 0 fru.bin #范例 ipmitool fru edit field
#Product ipmitool fru edit 0 field p 0 "Kunqian" ipmitool fru edit 0 field p 1 "KH2212G-HK" #Chassis ipmitool fru edit 0 field c 0 "Kunqian" #Board ipmitool fru edit 0 field b 0 "Kunqian" #Board Manufacturer to “xxxx” ipmitool fru edit 0 field b 0 "xxxx". #Board Product name to “xxxx” ipmitool fru edit 0 field b 1 "xxxx". #Board serial number to “xxxx” ipmitool fru edit 0 field b 2 "xxxx". #Board part number to “xxxx” ipmitool fru edit 0 field b 3 "xxxx". #Product Manufacturer to “xxxx” ipmitool fru edit 0 field p 0 "xxxx". #Product Product name to “xxxx” ipmitool fru edit 0 field p 1 "xxxx". #Product part number to “xxxx” ipmitool fru edit 0 field p 2 "xxxx". #Product version number to “xxxx” ipmitool fru edit 0 field p 3 "xxxx". #Product serial number to “xxxx” ipmitool fru edit 0 field p 4 "xxxx". #Asset tag to "xxxxx" ipmitool fru edit 0 field p 5 “xxxxx”. #Chassis Type to “xxxx” ipmitool fru edit 0 field c 0 "xxxx". #Chassis part number to “xxxx” ipmitool fru edit 0 field c 1 "xxxx". #Chassis serial number to “xxxx” ipmitool fru edit 0 field c 2 "xxxx". ##raw # 这将允许你执行原始的IPMI命令。作为一个例子,用一个原始命令来查询POH(通道开销)计数器: ipmitool -v raw 0x0 0xf Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 RAW REQ (channel=0x0 netfn=0x0 lun=0x0 cmd=0xf data_len=0) RAW RSP (5 bytes) 3c 2b 00 00 00 ###AIC #BMC重置 ipmitool raw 0x32 0x66 #风扇切换成手动,再设置转速,最后一位0x1e为设置30%的转速(16进制)。 前几位貌似不通用 ipmitool raw 0x00 0x30 0x01 0x00 ipmitool raw 0x30 0x30 0x02 0xff 0x1e ipmitool -I lanplus -H idrac控制地址-U 用户名 -P 密码 raw 0x30 0x30 0x02 0xff 0x1e # ipmitool raw 0x3a 0xa0