BMC IPMI常用命令

BMC IPMI常用命令

BMC(Baseboard Management Controler)提供了多種通道來和主機通信,進而檢測主機的溫度、風扇轉速、電壓、電源和現場可替代器件。爲了便於用戶使用,它提供了非常豐富的命令,下面介紹一下主要的常用命令。

1.      遠程電源控制類

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秒鐘的間隔,而後者是很快上電)

2.      讀取系統狀態類

Ipmitool sensor list   顯示系統所有傳感器列表

Ipmitool fru list   顯示系統所有現場可替代器件的列表

Ipmitool sdr list   顯示系統所有SDRRepository設備列表 

Ipmitool  pef list        顯示系統平臺時間過濾的列表

3.      系統日誌類

Ipmitool sel elist   顯示所有系統事件日誌

Ipmitool sel clear   刪除所有系統時間日誌

Ipmitool sel delete ID     刪除第IDSEL

Ipmitool sel time get      顯示當前BMC的時間

Ipmitool sel time set  XXX  設置當前BMC的時間

4.      啓動設置類

Ipmitool chassis bootdev bios  重啓後停在BIOS 菜單

Ipmitool chassis bootdev pxe 重啓後從PXE啓動

5.      系統相關的命令

Ipmitool mc info                               顯示BMC版本信息

Ipmitool bmc reset cold                                BMC 熱啓動

Ipmitool bmc reset warmBMC冷啓動

6.      網絡接口相關命令

Ipmitool lan print 1                                                          顯示channel1的網絡配置信息

Ipmitool lan set  1ipaddr 10.32.2.2                       設置channel1IP地址

Ipmitool lan  set 1 netmask 255.255.0.0                 設置channel1netmask

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                                         設置channel2ip 源在DHCP

Ipmitool lan set 3 ipsrc static                                     設置channel2ip是靜態獲得的

7.      通道相關命令

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   // 設置用戶在通道上的權限

 

8.      看門狗相關命令

Ipmitool  mc watchdog get 讀取當前看門狗的設置

Ipmitool watchdog  off     關掉看門狗

Ipmitool watchdog reset   在最近設置的計數器的基礎上重啓看門狗

 

9.       用戶管理相關命令

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]> 測試用戶

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章