一、軟件安裝
1、源碼安裝
wget https://downloads.sourceforge.net/project/ipmitool/ipmitool/1.8.18/ipmitool-1.8.18.tar.bz2
tar -jxf ipmitool-1.8.18.tar.bz2
cd ipmitool-1.8.18
./configure --prefix=/usr/local/ipmitool
make && make install
ln -s /usr/local/ipmitool/bin/ipmitool /usr/bin/ipmitool
2、在線安裝
- Ubuntu
apt -y install ipmitool
- CentOS
yum -y install ipmitool
二、常用操作
1、操作服務(wù)器
- 獲取服務(wù)器狀態(tài):
ipmitool -I lanplus -H {bmc-ip} -U {bmc-user} -P {bmc-password} power status
- 遠程開啟服務(wù)器:
ipmitool -I lanplus -H {bmc-ip} -U {bmc-user} -P {bmc-password} power on
- 遠程關(guān)閉服務(wù)器:
ipmitool -I lanplus -H {bmc-ip} -U {bmc-user} -P {bmc-password} power off
2、設(shè)置BMC網(wǎng)絡(luò)
- 查看BMC網(wǎng)絡(luò)信息(通常配置通道1):
ipmitool lan print 1
- 設(shè)置通道1使用靜態(tài)IP地址:
ipmitool lan print 1
- 設(shè)置BMC使用IP地址:
ipmitool lan set 1 ipaddr 172.16.21.98
- 設(shè)置BMC使用子網(wǎng)掩碼:
ipmitool lan set 1 netmask 255.255.255.0
- 設(shè)置BMC使用網(wǎng)關(guān):
ipmitool lan set 1 defgw ipaddr 172.16.21.205
3、設(shè)置BMC用戶
- 查看BMC用戶信息:
ipmitool user list 1
- 設(shè)置BMC用戶密碼:
ipmitool user set password {bmc-user-id} {bmc-password}
4、功率統(tǒng)計
參考鏈接:How can I view power consumption through IPMItool on X10 boards?文章來源地址http://www.zghlxwxcb.cn/news/detail-857709.html
- 獲取方式1(適用于supermicro主板):
服務(wù)器本機執(zhí)行ipmitool dcmi power reading
命令,查看瞬時功率情況(Instantaneous power reading)
注:可以30秒采集一次樣本,取瞬時功率情況,共采集60次,取60次平均值,即為該服務(wù)器平均運行功率
[root@node85 ~]# dmidecode -t1
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.
# SMBIOS implementations newer than version 3.1.1 are not
# fully supported by this version of dmidecode.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Supermicro
Product Name: Super Server
Version: 0123456789
Serial Number: 0123456789
UUID: a24b6000-3fa3-11eb-8000-ac1f6beba81e
Wake-up Type: Power Switch
SKU Number: To be filled by O.E.M.
Family: To be filled by O.E.M.
[root@node85 ~]# ipmitool dcmi power reading
Instantaneous power reading: 290 Watts
Minimum during sampling period: 196 Watts
Maximum during sampling period: 498 Watts
Average power reading over sample period: 272 Watts
IPMI timestamp: Mon Nov 14 08:27:39 2022
Sampling period: 00388554 Seconds.
Power reading state is: activated
- 獲取方式2:
a、任意客戶端執(zhí)行ipmitool -H {bmc-ip} -I lanplus -U {bmc-user} -P {bmc-password} sdr elist | grep "PW Consumption"
b、服務(wù)器本機執(zhí)行ipmitool sdr list | grep "PW Consumption"
[root@node41 ~]# ipmitool -H 172.16.21.99 -I lanplus -U ADMIN -P ADMIN sdr elist | grep "PW Consumption"
PW Consumption | 1Ah | ok | 21.0 | 278 Watts
文章來源:http://www.zghlxwxcb.cn/news/detail-857709.html
到了這里,關(guān)于【硬件相關(guān)】服務(wù)器IPMI管理的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!