IPMI命令常用命令设置

1、LAN configuration
一共有16个channel,找到所使用的channel
for i in `seq 1 14`; do ipmitool lan print $i 2>/dev/null | grep -q ^Set && echo Channel $i; done

ipmitool -I open lan print 1                           显示BMC通道的信息,如果不知道BMC使用的是哪个通道,请使用下面的命令确认:
ipmitool -I open channel info 1
ipmitool -I open lan set 1 ipsrc static                设置本地BMC地址为静态,才能设置IP
ipmitool -I open lan set 1 ipaddr 10.53.11.113         设置本地BMC的IP地址
ipmitool -I open lan set 1 netmask 255.255.255.0       子网掩码,别忘了设
ipmitool -I open lan set 1 defgw ipaddr 10.53.11.254   网关,可设可不设,不过一定要确保监控它的机器位于同一路由
ipmitool user list 1     查看BMC的用户列表
ipmitool user set name 1 username 对BMC的1号用户设置用户名username
ipmitool user set password 1 123456 对BMC的1号用户设置密码123456
关于lan:
lan用于远程访问,电源管理等。
open用于本地访问。
lanplus用于sol


2、一旦设置好ip,就可以通过远程服务器来更改ipmi的配置了。但是远程服务器需先安装ipmitool

ipmitool -I lan -U root -P wowcool321??? -H 210.77.146.102 power status
关于debug
ipmitool -vv -I lanplus -U ipmiuser -P password -H 172.168.6.3 power status

3、ipmitool 常用命令

# ipmitool -I lan -H 172.168.6.3 -U root -P 密码 power off (硬关机,直接切断电源)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密码 power soft (软关机,即如同轻按一下开机扭,对于linux,服务器将halt,power status 为off)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密码 power on (硬开机)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密码 power reset (硬重启)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密码 power status ( 获取当前电源状态)
# ipmitool -I lanplus -U root -P "password" -H 172.168.6.3 sensor get "Ambient Temp"| /bin/grep -i "Sensor Reading"|/bin/cut -c 26-28 //获取机箱温度.
ipmitool -I lanplus -U root -P "wowcool321???" -H 210.77.146.102 sensor get "Ambient Temp"| /bin/grep -i "Sensor Reading"|/bin/cut -c 26-28

具体的命令自己去查,这里只讲关键的:
ipmitool -I open sensor thresh   配置ID值等于id的监测项的各种限制值。
ipmitool -I open chassis status  查看主板状态,其中包括了主板电源信息,主板工作状态等
ipmitool -I open chassis restart_cause  查看上次系统重启的原因
ipmitool -I open chassis policy list  查看支持的底盘电源相关策略。
ipmitool -I open chassis power on 启动底盘,用此命令能够远程开机
ipmitool -I open chassis power off 关闭底盘,用此命令能够远程关机
ipmitool -I open chassis power reset实现硬重启,用此命令能够远程重启
ipmitool -I open mc reset 使BMC重新硬启动
ipmitool -I open mc info 查看BMC硬件信息
ipmitool -I open mc setenables =[on|off],配置bmc相应的允许/禁止选项。
ipmitool -I open mc getenables 列出BMC任何允许的选项
ipmitool -I open lan print 1 打印现咱channel 1的信息 。
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Supermicro IPMI 相关工具 IPMICFG IPMICFG 是一款用来配置 IPMI 装置的本机端 (In-band/Local) 工具。其命令行工具提供了标准 IPMI 指令与 Supermicro 专属的 OEM 指令用于作BMC/FRU 配置。此命令列介面工具可在 UEFI、DOS、Windows 与 Linux 操作系统上执行,毋需安装。 IPMICFG 产品特点: 设置 IPMI IP 地址 设置 IPMI 配置 配置 IPMI 使用者 配置 IPMI FRU 管理系统事件日志(SEL) 透过 NM (Node Manager) 协议管理 IPMI 硬件需求 具备基板控制器(BMC)并支援 IPMI 2.0 规格的 Supermicro 系统. 操作系统 (OS) DOS 5.0 或以上相容版本 Microsoft Windows 7 / 8 / 8.1 / 10 /Server 2003 32bit and 64bit / Server 2008 32bit and 64bit / Server 2012 / Server 2016 Linux Kernel version 2.6.x 以上. Ex: Red Hat Enterprise Linux (RHEL) 6.8 and 7.2 SUSE Linux Enterprise Server (SLES) 11 SP4 and 12 SP1 Ubuntu Server 14.04 LTS and 16.04 LTS UEFI Shell Usage: IPMICFG params (Example: IPMICFG -m 192.168.1.123) -m Show IP and MAC. -m IP Set IP (format: ###.###.###.###). -a MAC Set MAC (format: ##:##:##:##:##:##). -k Show Subnet Mask. -k Mask Set Subnet Mask (format: ###.###.###.###). -dhcp Get the DHCP status. -dhcp on Enable the DHCP. -dhcp off Disable the DHCP. -g Show Gateway IP. -g IP Set Gateway IP (format: ###.###.###.###). -r BMC cold reset. option: -d | Detected IPMI device for BMC reset. -garp on Enable the Gratuitous ARP. -garp off Disable the Gratuitous ARP. -fd Reset to the factory default. option: -d | Detected IPMI device for BMC reset. -fdl Reset to the factory default. (Clean LAN) option: -d | Detected IPMI device for BMC reset. -fde Reset to the factory default. (Clean FRU & LAN) option: -d | Detected IPMI device for BMC reset. -ver Get Firmware revision. -vlan Get VLAN status. -vlan on Enable the VLAN and set t

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值