4.3. ipmitool - utility for controlling IPMI-enabled devices

4.3.1. ipmitool

4.3.1.1. ubuntu

确定硬件是否支持 IPMI

neo@monitor:~$ sudo dmidecode |grep -C 5 IPMI

[sudo] password for neo:

Handle 0x2000, DMI type 32, 11 bytes

System Boot Information

Status: No errors detected

Handle 0x2600, DMI type 38, 18 bytes

IPMI Device Information

Interface Type: KCS (Keyboard Control Style)

Specification Version: 2.0

I2C Slave Address: 0x10

NV Storage Device: Not Present

Base Address: 0x0000000000000CA8 (I/O)

sudo apt-get install openipmi

sudo apt-get install ipmitool

sudo mkdir -p /var/lock/subsys/ipmi

$ sudo /etc/init.d/openipmi start

* Starting ipmi drivers [ OK ]

4.3.1.2. CentOS

# yum search ipmi

========================================== Matched: ipmi ===========================================

OpenIPMI.x86_64 : OpenIPMI (Intelligent Platform Management Interface) library and tools

OpenIPMI-devel.i386 : The development environment for the OpenIPMI project.

OpenIPMI-devel.x86_64 : The development environment for the OpenIPMI project.

OpenIPMI-gui.x86_64 : IPMI graphical user interface tool

OpenIPMI-libs.i386 : The OpenIPMI runtime libraries

OpenIPMI-libs.x86_64 : The OpenIPMI runtime libraries

OpenIPMI-perl.x86_64 : OpenIPMI Perl language bindings

OpenIPMI-python.x86_64 : OpenIPMI Python language bindings

OpenIPMI-tools.x86_64 : OpenIPMI utilities and scripts from ipmitool

collectd-ipmi.x86_64 : IPMI module for collectd

freeipmi.i386 : FreeIPMI

freeipmi.x86_64 : FreeIPMI

freeipmi-bmc-watchdog.x86_64 : FreeIPMI BMC watchdog

freeipmi-devel.i386 : Development package for FreeIPMI

freeipmi-devel.x86_64 : Development package for FreeIPMI

freeipmi-ipmidetectd.x86_64 : IPMI node detection monitoring daemon

openhpi.i386 : openhpi Hardware Platform Interface (HPI) library and tools

openhpi.x86_64 : openhpi Hardware Platform Interface (HPI) library and tools

ripmime.x86_64 : Extract attachments out of a MIME encoded email packages

watchdog.x86_64 : Software and/or Hardware watchdog daemon

# yum install OpenIPMI OpenIPMI-tools -y

4.3.2. sensor

# ipmitool -I open sensor list

4.3.3. ipmitool shell

# ipmitool shell

mc info

ipmitool> mc info

Device ID : 32

Device Revision : 0

Firmware Revision : 1.54

IPMI Version : 2.0

Manufacturer ID : 674

Manufacturer Name : DELL Inc

Product ID : 256 (0x0100)

Product Name : Unknown (0x100)

Device Available : yes

Provides Device SDRs : yes

Additional Device Support :

Sensor Device

SDR Repository Device

SEL Device

FRU Inventory Device

IPMB Event Receiver

Bridge

Chassis Device

Aux Firmware Rev Info :

0x00

0x0f

0x00

0x00

ipmitool> lan print 1

Set in Progress : Set Complete

Auth Type Support : NONE MD2 MD5 PASSWORD

Auth Type Enable : Callback : MD2 MD5

: User : MD2 MD5

: Operator : MD2 MD5

: Admin : MD2 MD5

: OEM :

IP Address Source : Static Address

IP Address : 172.16.1.132

Subnet Mask : 255.255.255.0

MAC Address : 84:2b:2b:fd:e2:51

SNMP Community String : public

IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10

Default Gateway IP : 172.16.1.254

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 : aaaaaaaaaaaaaaa

: X=Cipher Suite Unused

: c=CALLBACK

: u=USER

: o=OPERATOR

: a=ADMIN

: O=OEM

4.3.4. ipmitool 访问远程主机

# ipmitool -H 172.16.1.155 -U root -P 123456 lan print 1

Set in Progress : Set Complete

Auth Type Support : NONE MD2 MD5 PASSWORD

Auth Type Enable : Callback : MD2 MD5

: User : MD2 MD5

: Operator : MD2 MD5

: Admin : MD2 MD5

: OEM :

IP Address Source : Static Address

IP Address : 172.16.1.15

Subnet Mask : 255.255.255.0

MAC Address : 84:2b:2b:fc:fb:cc

SNMP Community String : public

IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10

Default Gateway IP : 172.16.1.254

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 : aaaaaaaaaaaaaaa

: X=Cipher Suite Unused

: c=CALLBACK

: u=USER

: o=OPERATOR

: a=ADMIN

: O=OEM

4.3.5. Get chassis status and set power state

# ipmitool -I open chassis

Chassis Commands: status, power, identify, policy, restart_cause, poh, bootdev, bootparam, selftest

# ipmitool -I open chassis status

System Power : on

Power Overload : false

Power Interlock : inactive

Main Power Fault : false

Power Control Fault : false

Power Restore Policy : previous

Last Power Event :

Chassis Intrusion : inactive

Front-Panel Lockout : inactive

Drive Fault : false

Cooling/Fan Fault : false

Sleep Button Disable : not allowed

Diag Button Disable : allowed

Reset Button Disable : not allowed

Power Button Disable : allowed

Sleep Button Disabled: false

Diag Button Disabled : true

Reset Button Disabled: false

Power Button Disabled: false

4.3.6. Configure Management Controller

4.3.6.1. Management Controller status and global enables

# ipmitool -I open mc

MC Commands:

reset

guid

info

watchdog

selftest

getenables

setenables ...

recv_msg_intr Receive Message Queue Interrupt

event_msg_intr Event Message Buffer Full Interrupt

event_msg Event Message Buffer

system_event_log System Event Logging

oem0 OEM 0

oem1 OEM 1

oem2 OEM 2

4.3.6.2. Configure LAN Channels

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 172.16.0.2 设置本地BMC的IP地址

ipmitool -I open lan set 1 netmask 255.255.255.0 子网掩码,别忘了设

ipmitool -I open lan set 1 defgw ipaddr 172.16.0.254 网关,可设可不设,不过一定要确保监控它的机器位于同一路由

4.3.6.3. Configure Management Controller users

ipmitool user list 1 查看BMC的用户列表

ipmitool user set name 1 username 对BMC的1号用户设置用户名username

ipmitool user set password 1 123456 对BMC的1号用户设置密码123456

4.3.6.4. Configure Management Controller channels

# ipmitool -I open channel info 1

Channel 0x1 info:

Channel Medium Type : 802.3 LAN

Channel Protocol Type : IPMB-1.0

Session Support : multi-session

Active Session Count : 0

Protocol Vendor ID : 7154

Volatile(active) Settings

Alerting : disabled

Per-message Auth : disabled

User Level Auth : enabled

Access Mode : always available

Non-Volatile Settings

Alerting : disabled

Per-message Auth : disabled

User Level Auth : enabled

Access Mode : always available

4.3.7. Example for iDRAC

4.3.7.1. 更改IP地址,子网掩码与网关

查看IP,子网掩码与网关

# ipmitool -I open lan print 1

Set in Progress : Set Complete

Auth Type Support : NONE MD2 MD5 PASSWORD

Auth Type Enable : Callback : MD2 MD5

: User : MD2 MD5

: Operator : MD2 MD5

: Admin : MD2 MD5

: OEM :

IP Address Source : Static Address

IP Address : 172.16.5.23

Subnet Mask : 255.255.255.0

MAC Address : 18:03:73:f5:ee:82

SNMP Community String : public

IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10

Default Gateway IP : 172.16.5.254

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 : aaaaaaaaaaaaaaa

: X=Cipher Suite Unused

: c=CALLBACK

: u=USER

: o=OPERATOR

: a=ADMIN

: O=OEM

设置IP,子网掩码与网关

/usr/bin/ipmitool -I open lan set 1 ipaddr 172.16.8.200

/usr/bin/ipmitool -I open lan set 1 netmask 255.255.255.0

/usr/bin/ipmitool -I open lan set 1 defgw ipaddr 172.16.8.254

/usr/bin/ipmitool -I open lan set 1 access on

4.3.7.2. 更改 iDRAC LCD 显示屏

# ipmitool delloem lcd set mode userdefined test

# ipmitool delloem lcd info

LCD info

Setting: User defined

Text: test

4.3.7.3. 更改 iDRAC 密码

# ipmitool user list 2

ID Name Callin Link AuthIPMI Msg Channel Priv Limit

2 root true true true ADMINISTRATOR

# ipmitool user set password 2 "mypasswd"

4.3.7.4. 关机/开机

服务器关机

#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power off

服务器开机

#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power on

服务器 reset

#ipmitool -I lan -U root -P secpass -H 10.10.0.5 power reset

4.3.7.5. 启动列表

ipmitool -I lan -H 10.10.0.5 -U ADMIN -P ADMIN chassis bootdev pxe

ipmitool 设置网关_IPMI (Intelligent Platform Management Interface)相关推荐

  1. ipmitool 设置网关_IPMI 接口配置

    IPMI 接口配置 bios配置ipmi 找到IPMI接口后,我们要接上一根网线.然后开机点亮,按F2或者DEL进入BIOS,具体按那个按钮看开机提示,例如我的这台机器需要按F2进入BIOS 进入BI ...

  2. ipmitool 设置网关_Linux下使用命令行配置IPMI

    ipmitool是什么: 百度百科给的解释已经够用了,简单说就是"IPMI(Intelligent Platform Management Interface)即智能平台管理接口是使硬件管理 ...

  3. ipmitool 设置网关_IPMITOOL常用操作指令

    一.开关机,重启 1. 查看开关机状态: ipmitool -H (BMC的管理IP地址) -I lanplus -U (BMC登录用户名) -P (BMC 登录用户名的密码) power statu ...

  4. 【NVMe-MI 1.2a - 1】NVM Express Management Interface介绍

      NVM Express Management Interface规范是NVMe协议族的一员:   NVMe接口允许in-band主机软件与 NVM 子系统通信.规范定义了2种管理 NVMe Sto ...

  5. ubuntu 设置IP,设置网关

    本文系转载,介绍Ubuntu如何设置IP和网络来连接网络 如果是在虚拟机中使用Ubuntu,那么设置之前请先参照我的上一遍文章虚拟机Net方式设置连接外网 中的网络设置部分,先设置好主机的网络,然后配 ...

  6. 批处理方式设置网关与跃点

    批处理方式设置网关与跃点 查看ip ipconfig /all 查看路由 route print 设置路由跃点 netsh interface ip set address name="以太 ...

  7. 网关是个啥?为什么电脑不设置网关就没法上网?笔记本为啥不用设置网关?

    在指定了ip地址和子网掩码后,还需设置网关,不设置就没法上网.(比如百度只能显示一级搜索,图片没法显示,点进去就显示网络出错...那可能只是百度的缓存) 网关一定要设置正确,比如我必须设置成192.1 ...

  8. XenDesktop 5.6 PVS6.1测试中出现的一例错误:Management Interface:Remote request failed

    创建VDisk中无法创建,提示错误如下:Management Interface:Remote request failed 解决方案:重启Citrix PVS Soap Server服务 在PVS ...

  9. 无线桥接怎么设置网关和dns服务器,无线桥接怎么设置网关和dns服务器

    无线桥接怎么设置网关和dns服务器 内容精选 换一换 安全高效.稳定高可用是每一位涉云从业者的共同诉求.这一诉求实现的前提,离不开系统可用性.数据可靠性及运维稳定性三者的完美配合.本文将通过评估项目. ...

最新文章

  1. THE发布世界大学声誉排名,清华位居全球前10
  2. 又跌了!7 月程序员工资平均 14357 元 | 原力计划
  3. WritableComparable排序案例(区内排序)
  4. android 按钮放中间,Android实现button居中的方法
  5. linux公社 java算法_Java快速排序算法
  6. hibernate多对多、正向工程创建数据表——访问温馨提示
  7. Window系统下安装Redis
  8. 领域应用 | 常识性概念图谱建设以及在美团场景中的应用
  9. Kafka 源码解析:Server 端的运行过程
  10. 【SICP练习】123 练习3.54
  11. SQL Server - 深入探讨SQL Server 2016新特性之 --- Temporal Table(历史表)
  12. 深入 CoreML 模型定义
  13. 今天,腾讯云总裁邱跃鹏表示,云计算发展要迈过三道关……
  14. css-图片旋转木马3D效果
  15. Java异常处理最佳实践及陷阱防范
  16. css3绘制十字架,纯css画十字架 8.21
  17. stm32内部Flash读写
  18. Java基础入门必须知道的英语词汇
  19. android休眠唤醒屏幕,Android屏幕的休眠和唤醒
  20. 批量jpg转png 批量png转jpg 批量jpg2png 批量png2jpg

热门文章

  1. 2435: [Noi2011]道路修建
  2. 污水处理厂数字监控系统解决方案
  3. MySQL InnoDB的内存管理
  4. golang 获取 进程 名称 id
  5. php 框架 laravel 简介
  6. linux shell ascii 字符 转换
  7. linux c printf 打印输出null
  8. linux c openssl rsa 加解密
  9. python3 问题 No module named _sqlite3 解决方案
  10. php global变量无效