电脑计算机论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 255|回复: 0

无法使用ipmitool一例以及ipmitool使用详解

[复制链接]
admin 发表于 2022-12-1 16:19:32 | 显示全部楼层 |阅读模式
遇到一台新的服务器,正常开机后,无法使用ipmitool, 按照网上教程加载模块:


首先查看相关模块是否已加载:
lsmod | grep ^ipmi

然后确保加载以下模块:
modprobe ipmi_watchdog
modprobe ipmi_poweroff
modprobe ipmi_devintf
modprobe ipmi_si    加载该模块如果没有不影响ipmi使用(与系统版本有关)
modprobe ipmi_msghandler  加载该模块如果没有不影响ipmi的使用

结果全部加载后,ipmitool仍然不好用, 随后重启进入bios,然后重置bmc,新设置ip,系统重启后,ipmitool使用正常了。
然后可以使用几个ipmitool常用的命令:
  1、ipmitool user list 1   (查看用户)
例如结果:
id      userid
2       admin               
    ipmitool user set password 2   密码      (给id2的用户设置密码)
ipmitool lan print 1     查看网卡配置


#读取系统状态类


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 chassis bootdev bios  #重启后停在BIOS 菜单
ipmitool chassis bootdev pxe #重启后从PXE启动
#系统相关的命令


ipmitool mc info       #显示BMC版本信息
ipmitool bmc reset cold      #BMC 冷启动
ipmitool bmc reset warmBMC    #热启动
#网络接口相关命令


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        #设置channel3的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  mc watchdog get #读取当前看门狗的设置
ipmitool watchdog  off   #关掉看门狗
ipmitool watchdog reset  #在最近设置的计数器的基础上重启看门狗
#用户管理相关命令


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]> #测试用户





您需要登录后才可以回帖 登录 | 注册

本版积分规则


QQ|手机版|小黑屋|电脑计算机论坛 ( 京ICP备2022023538号-1 )

GMT+8, 2024-3-28 23:35 , Processed in 0.068266 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表