ipmitool 命令

问题:  机房机器迁移了ip改变了,远控idrac地址也得改变,懒得去机房连线挨个更改远控地址,

现在的idrac又没有了前面板配置,找了一个在线修改idrac远控ip的工具

csdn下载: https://download.csdn.net/download/zhangxueleishamo/87736925

或直接yum安装

 yum  -y install ipmitool

更改远控ip

[16:36 ~]# ipmitool lan set 1 ipaddr 10.200.42.22
Setting LAN IP Address to 10.200.42.22

[16:36 ~]# ipmitool lan set 1 defgw ipaddr 10.200.42.1
Setting LAN Default Gateway IP to 10.200.42.1

[16:36 ~]# ipmitool lan set 1 netmask 255.255.254.0


[root ~]# ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : MD5 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : 
IP Address Source       : Static Address
IP Address              : 10.200.42.22
Subnet Mask             : 255.255.254.0
MAC Address             : d0:94:66:3a:ff:3d
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 2.0 seconds
Default Gateway IP      : 10.200.42.1
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : Xaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : Not Available

 又查了下其他用法记录在下,如果密码忘记,也可用此命令

IPMI(Intelligent Platform Management Interface)

智能平台管理接口 (IPMI) 是一种开放标准的硬件管理接口规格,定义了嵌入式管理子系统进行通信的特定方法。IPMI 信息通过基板管理控制器 (BMC)(位于 IPMI 规格的硬件组件上)进行交流。使用低级硬件智能管理而不使用操作系统进行管理,具有两个主要优点: 首先,此配置允许进行带外服务器管理;其次,操作系统不必负担传输系统状态数据的任务。IPMI的核心是一个专用芯片/控制器(叫做服务器处理器或基板管理控制器(BMC)),其并不依赖于服务器的处理器、BIOS或操作系统来工作,可谓非常地独立,是一个单独在系统内运行的无代理管理子系统,

IPMI功能:

监控服务器的物理健康特征,如温度、电压、风扇工作状态、电源状态等;

可以通过串口、Modem以及Lan等远程环境管理服务器系统,如远程开关机;

IPMITOOL

ipmitool 是一种可用在 linux 系统下的命令行方式的 ipmi 平台管理工具,它支持 ipmi 1.5 规范(最新的规范为 ipmi 2.0),通过它可以实现获取传感器的信息、显示系统日志内容、网络远程开关机等功能。使用:
 

ipmitool –I open sensor list #命令可以获取传感器中的各种监测值和该值的监测阈值,包括(CPU温度,电压,风扇转速,电源调制模块温度,电源电压等信息。
ipmitool –I open sensor thresh #设置ID值等于id的监测项的各种限制值。
ipmitool –I open chassis status #查看底盘状态,其中包括了底盘电源信息,底盘工作状态等
ipmitool –I open chassis restart_cause #查看上次系统重启的原因

#远程电源管理

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秒钟的间隔,而后者是很快上电)

#远程引导(当次生效)

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 (光驱引导)

#读取系统状态类

ipmitool sensor list   #显示系统所有传感器列表
ipmitool fru list   #显示系统所有现场可替代器件的列表
ipmitool sdr list   #显示系统所有SDRRepository设备列表 
ipmitool  pef list      #显示系统平台时间过滤的列表

#系统日志类

ipmitool sel elist   #显示所有系统事件日志
ipmitool sel clear   #删除所有系统时间日志
ipmitool sel delete ID     #删除第ID条SEL
ipmitool sel time get      #显示当前BMC的时间
ipmitool sel time set  XXX  #设置当前BMC的时间

#网络接口相关命令

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是静态获得的

#通道相关命

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   #设置用户在通道上的权限

#用户管理相关命令

ipmitool user list chan-id   #显示某通道上的所有用户
ipmitool set password <user id>[<password>] #修改某用户的密码
ipmitool disable      <user id>  #禁止掉某用户
ipmitool enable       <user id>  #使能某用户
ipmitool priv         <user id> <privilegelevel> [<channel number>] #修改某用户在某通道上的权限
ipmitool test         <user id> <16|20>[<password]> #测试用户

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

疯飙的蜗牛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值