欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux之ipmitool管理BMC詳解

 更新時(shí)間:2024年11月29日 14:50:57   作者:零時(shí)搞學(xué)習(xí)  
這篇文章介紹了ipmitool的基本用法和一些常用的命令,包括獲取傳感器信息、顯示系統(tǒng)信息、電源控制、顯示事件日志和啟用/禁用BMC用戶(hù)等,還介紹了如何通過(guò)IPMI-over-LAN遠(yuǎn)程控制BMC,并提供了連接到遠(yuǎn)程BMC的基本步驟

BMC管理 – ipmitool

老規(guī)矩,先 help看看參數(shù)

[root@test ~]# ipmitool -h
ipmitool version 1.8.18

usage: ipmitool [options...] <command>

       -h             This help
       -V             Show version information
       -v             Verbose (can use multiple times)
       -c             Display output in comma separated format
       -d N           Specify a /dev/ipmiN device to use (default=0)
       -I intf        Interface to use
       -H hostname    Remote host name for LAN interface
       -p port        Remote RMCP port [default=623]
       -U username    Remote session username
       -f file        Read remote session password from file
       -z size        Change Size of Communication Channel (OEM)
       -S sdr         Use local file for remote SDR cache
       -D tty:b[:s]   Specify the serial device, baud rate to use
                      and, optionally, specify that interface is the system one
       -4             Use only IPv4
       -6             Use only IPv6
       -a             Prompt for remote password
       -Y             Prompt for the Kg key for IPMIv2 authentication
       -e char        Set SOL escape character
       -C ciphersuite Cipher suite to be used by lanplus interface
       -k key         Use Kg key for IPMIv2 authentication
       -y hex_key     Use hexadecimal-encoded Kg key for IPMIv2 authentication
       -L level       Remote session privilege level [default=ADMINISTRATOR]
                      Append a '+' to use name/privilege lookup in RAKP1
       -A authtype    Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM
       -P password    Remote session password
       -E             Read password from IPMI_PASSWORD environment variable
       -K             Read kgkey from IPMI_KGKEY environment variable
       -m address     Set local IPMB address
       -b channel     Set destination channel for bridged request
       -t address     Bridge request to remote target address
       -B channel     Set transit channel for bridged request (dual bridge)
       -T address     Set transit address for bridge request (dual bridge)
       -l lun         Set destination lun for raw commands
       -o oemtype     Setup for OEM (use 'list' to see available OEM types)
       -O seloem      Use file for OEM SEL event descriptions
       -N seconds     Specify timeout for lan [default=2] / lanplus [default=1] interface
       -R retry       Set the number of retries for lan/lanplus interface [default=4]

Interfaces:
        open          Linux OpenIPMI Interface [default]
        imb           Intel IMB Interface
        lan           IPMI v1.5 LAN Interface
        lanplus       IPMI v2.0 RMCP+ LAN Interface
        serial-terminal  Serial Interface, Terminal Mode
        serial-basic  Serial Interface, Basic Mode
        usb           IPMI USB Interface(OEM Interface for AMI Devices)

Commands:
        raw           Send a RAW IPMI request and print response
        i2c           Send an I2C Master Write-Read command and print response
        spd           Print SPD info from remote I2C device
        lan           Configure LAN Channels
        chassis       Get chassis status and set power state
        power         Shortcut to chassis power commands
        event         Send pre-defined events to MC
        mc            Management Controller status and global enables
        sdr           Print Sensor Data Repository entries and readings
        sensor        Print detailed sensor information
        fru           Print built-in FRU and scan SDR for FRU locators
        gendev        Read/Write Device associated with Generic Device locators sdr
        sel           Print System Event Log (SEL)
        pef           Configure Platform Event Filtering (PEF)
        sol           Configure and connect IPMIv2.0 Serial-over-LAN
        tsol          Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
        isol          Configure IPMIv1.5 Serial-over-LAN
        user          Configure Management Controller users
        channel       Configure Management Controller channels
        session       Print session information
        dcmi          Data Center Management Interface
        nm            Node Manager Interface
        sunoem        OEM Commands for Sun servers
        kontronoem    OEM Commands for Kontron devices
        picmg         Run a PICMG/ATCA extended cmd
        fwum          Update IPMC using Kontron OEM Firmware Update Manager
        firewall      Configure Firmware Firewall
        delloem       OEM Commands for Dell systems
        shell         Launch interactive IPMI shell
        exec          Run list of commands from file
        set           Set runtime variable for shell and exec
        hpm           Update HPM components using PICMG HPM.1 file
        ekanalyzer    run FRU-Ekeying analyzer using FRU files
        ime           Update Intel Manageability Engine Firmware
        vita          Run a VITA 46.11 extended cmd
        lan6          Configure IPv6 LAN Channels

ipmitool命令的基本格式是:

ipmitool [選項(xiàng)] <命令> [參數(shù)]

其中:

  • 選項(xiàng)是一些可選的開(kāi)關(guān),用于設(shè)置ipmitool的一些參數(shù)。
  • 命令是要執(zhí)行的操作,如獲取傳感器信息等。
  • 參數(shù)是可選的,它們是指定要執(zhí)行的特定操作所需的選項(xiàng)和值。

常用的ipmitool命令

1.獲取傳感器信息

ipmitool sensor get <Sensor ID>

其中,

<Sensor ID>是要獲取的傳感器的ID。

此命令將顯示指定傳感器的當(dāng)前狀態(tài)。

2.顯示系統(tǒng)信息

ipmitool fru print

此命令將打印系統(tǒng)中所有可用的FRU(固件可重編程單元)信息。

3.電源控制

ipmitool power on   開(kāi)啟電源
ipmitool power off	關(guān)閉電源
ipmitool power reset	重置電源,按我的理解是沒(méi)有完全斷電的動(dòng)作,類(lèi)似系統(tǒng)的reboot
ipmitool power cycle	先關(guān)閉電源,再開(kāi)啟

這些命令用于控制服務(wù)器的電源狀態(tài)。

4.顯示事件日志

ipmitool sel list

此命令將顯示系統(tǒng)的事件日志。

5.啟用/禁用BMC用戶(hù)

ipmitool user enable <用戶(hù)ID>
ipmitool user disable <用戶(hù)ID>

這些命令用于啟用或禁用BMC用戶(hù)。

以上是一些常用的ipmitool命令和它們的基本用法。

更多的ipmitool命令和選項(xiàng)可以通過(guò)ipmitool -h命令查看完整的幫助文檔。

關(guān)于OS下設(shè)定BMC或遠(yuǎn)程控制服務(wù)器的BMC命令等

ipmitool可以通過(guò)IPMI-over-LAN(基于LAN的IPMI協(xié)議)來(lái)遠(yuǎn)程控制BMC。

要使用IPMI-over-LAN,您需要確保BMC已經(jīng)配置并連接到網(wǎng)絡(luò)。

通過(guò)IPMI-over-LAN連接到BMC并進(jìn)行遠(yuǎn)程控制的步驟

1.確定BMC的IP地址

使用ipmitool lan print命令可以獲取BMC的IP地址、MAC地址和子網(wǎng)掩碼等信息。

如果BMC未配置IP地址,則需要在本地物理訪(fǎng)問(wèn)服務(wù)器以配置BMC。

2.連接到BMC

使用ipmitool lan set <參數(shù)>命令設(shè)置BMC的用戶(hù)名、密碼和IP地址等信息。

例如,下面的命令設(shè)置BMC的IP地址為192.168.1.100,并將用戶(hù)名設(shè)置為admin,密碼設(shè)置為password:

ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 192.168.1.100
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 192.168.1.1
ipmitool user set name 2 admin
ipmitool user set password 2 password

注意:

這里假設(shè)BMC使用的是默認(rèn)的LAN通道1。

如果使用的是其他通道,則需要將1替換為相應(yīng)通道的數(shù)字。

3.啟用IPMI-over-LAN功能

使用ipmitool channel info <通道號(hào)>命令檢查BMC所在通道的IPMI-over-LAN功能是否已經(jīng)啟用。

如果未啟用,可以使用以下命令啟用:

ipmitool channel setaccess <通道號(hào)> 2 ipmi=on auth=off link=on privilege=4

這將啟用指定通道的IPMI-over-LAN功能,并使得通過(guò)此通道的IPMI會(huì)話(huà)的權(quán)限級(jí)別為4(ADMINISTRATOR級(jí)別)。

4.連接到遠(yuǎn)程BMC

使用以下命令連接到遠(yuǎn)程BMC:

ipmitool -H <BMC IP地址> -U <用戶(hù)名> -P <密碼> -I lanplus <命令>

注意,這里使用了-I lanplus選項(xiàng),以使用基于LAN的IPMI協(xié)議。

<命令>是您要執(zhí)行的ipmitool命令。

例如:

要獲取傳感器信息,可以使用以下命令:

ipmitool -H 192.168.1.100 -U admin -P password -I lanplus sensor list

這將顯示遠(yuǎn)程BMC的傳感器列表信息。

總結(jié)

以上是通過(guò)ipmitool進(jìn)行遠(yuǎn)程BMC控制的基本步驟。

請(qǐng)注意,遠(yuǎn)程BMC的訪(fǎng)問(wèn)權(quán)限應(yīng)該是受限的,只有授權(quán)用戶(hù)才能訪(fǎng)問(wèn)。此外,您還應(yīng)該確保網(wǎng)絡(luò)安全措施已經(jīng)得到了應(yīng)用,以確保遠(yuǎn)程訪(fǎng)問(wèn)的安全性。

這些僅為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論