zl程序教程

您现在的位置是:首页 >  其他

当前栏目

ipmitool安装,常用指令

安装 常用 指令
2023-09-14 09:09:24 时间

IPMI: Intelligent Platform Management Interface
1.下载地址:

https://sourceforge.net/projects/ipmitool/
2.安装步骤

a. tar -xvf ipmitool-1.8.18.tar.bz2
b. cd ipmitool-1.8.18
c. ./configure
d. make
e.make install
f.
modprobe ipmi_si
modprobe ipmi_devintf
modprobe ipmi_msghandler
安装成功(实测Centos7.4)
3.常用指令

    远程电源控制类 远程电源控制类
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power off
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power on
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power reset
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power cycle
    (注意power cycle 和power reset的区别在于前者从掉电到上电有1秒钟的间隔,而后者是很快上电)
    读取系统状态类
    Ipmitool sensor list 显示系统所有传感器列表
    Ipmitool fru list 显示系统所有现场可替代器件的列表
    Ipmitool sdr list 显示系统所有SDRRepository设备列表
    Ipmitool pef list 显示系统平台时间过滤的列表
    3 系统日志类
    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 设置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 mc watchdog get 读取当前看门狗的设置
    Ipmitool watchdog off 关掉看门狗
    Ipmitool watchdog reset 在最近设置的计数器的基础上重启看门狗
    用户管理相关命令
    Ipmitool user list chan-id 显示某通道上的所有用户
    Ipmitool set password [] 修改某用户的密码
    Ipmitool disable 禁止掉某用户
    ipmitool enable 使能某用户
    ipmitool priv [] 修改某用户在某通道上的权限
    ipmitool test <16|20>[<password]> 测试用户