最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux之ipmitool管理BMC詳解

 更新時間:2024年11月29日 14:50:57   作者:零時搞學習  
這篇文章介紹了ipmitool的基本用法和一些常用的命令,包括獲取傳感器信息、顯示系統(tǒng)信息、電源控制、顯示事件日志和啟用/禁用BMC用戶等,還介紹了如何通過IPMI-over-LAN遠程控制BMC,并提供了連接到遠程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 [選項] <命令> [參數(shù)]

其中:

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

常用的ipmitool命令

1.獲取傳感器信息

ipmitool sensor get <Sensor ID>

其中,

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

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

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

ipmitool fru print

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

3.電源控制

ipmitool power on   開啟電源
ipmitool power off	關閉電源
ipmitool power reset	重置電源,按我的理解是沒有完全斷電的動作,類似系統(tǒng)的reboot
ipmitool power cycle	先關閉電源,再開啟

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

4.顯示事件日志

ipmitool sel list

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

5.啟用/禁用BMC用戶

ipmitool user enable <用戶ID>
ipmitool user disable <用戶ID>

這些命令用于啟用或禁用BMC用戶。

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

更多的ipmitool命令和選項可以通過ipmitool -h命令查看完整的幫助文檔。

關于OS下設定BMC或遠程控制服務器的BMC命令等

ipmitool可以通過IPMI-over-LAN(基于LAN的IPMI協(xié)議)來遠程控制BMC。

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

通過IPMI-over-LAN連接到BMC并進行遠程控制的步驟

1.確定BMC的IP地址

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

如果BMC未配置IP地址,則需要在本地物理訪問服務器以配置BMC。

2.連接到BMC

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

例如,下面的命令設置BMC的IP地址為192.168.1.100,并將用戶名設置為admin,密碼設置為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

注意:

這里假設BMC使用的是默認的LAN通道1。

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

3.啟用IPMI-over-LAN功能

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

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

ipmitool channel setaccess <通道號> 2 ipmi=on auth=off link=on privilege=4

這將啟用指定通道的IPMI-over-LAN功能,并使得通過此通道的IPMI會話的權限級別為4(ADMINISTRATOR級別)。

4.連接到遠程BMC

使用以下命令連接到遠程BMC:

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

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

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

例如:

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

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

這將顯示遠程BMC的傳感器列表信息。

總結

以上是通過ipmitool進行遠程BMC控制的基本步驟。

請注意,遠程BMC的訪問權限應該是受限的,只有授權用戶才能訪問。此外,您還應該確保網(wǎng)絡安全措施已經(jīng)得到了應用,以確保遠程訪問的安全性。

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

相關文章

  • 教你一步一步在linux中正確的安裝Xcache加速php

    教你一步一步在linux中正確的安裝Xcache加速php

    這篇文章主要介紹了教你一步一步在linux中正確的安裝Xcache加速php,需要的朋友可以參考下
    2017-04-04
  • Linux中拷貝 cp命令中拷貝所有的寫法詳解

    Linux中拷貝 cp命令中拷貝所有的寫法詳解

    本篇文章主要介紹了Linux中拷貝 cp命令中拷貝所有的寫法,具有一定的參考價值,感興趣的小伙伴們可以參考一下。
    2016-12-12
  • 淺談在linux kernel中打印函數(shù)調(diào)用的堆棧的方法

    淺談在linux kernel中打印函數(shù)調(diào)用的堆棧的方法

    下面小編就為大家?guī)硪黄獪\談在linux kernel中打印函數(shù)調(diào)用的堆棧的方法。小編覺得挺不錯的?,F(xiàn)在就分享給大家。也給大家做個參考。一起跟隨小編過來看看吧
    2016-12-12
  • ubuntu無法ssh遠程,提示'Permission denied (publickey)'的解決方法

    ubuntu無法ssh遠程,提示'Permission denied (publickey

    SSH(Secure Shell)是一種加密的網(wǎng)絡協(xié)議,用于在網(wǎng)絡上安全地傳輸數(shù)據(jù),它被廣泛用于遠程登錄和執(zhí)行命令,有時候使用SSH登錄時,可能會遇到錯誤消息Permission denied (publickey)導致登錄失敗,這種情況可能由多種原因引起,將探討導致SSH登錄失敗的可能性,并提供解決方案
    2025-04-04
  • apache的文件工具類FileUtils詳解

    apache的文件工具類FileUtils詳解

    org.apache.commons.io.FileUtils是apache提供用來操作文件的工具類,可以簡化文件操作,這篇文章主要介紹了apache的文件工具類FileUtils,需要的朋友可以參考下
    2023-11-11
  • Linux切換root用戶的幾種實現(xiàn)方式

    Linux切換root用戶的幾種實現(xiàn)方式

    在Linux系統(tǒng)中,root用戶為超級用戶,擁有最高權限,切換到root用戶的常用方法包括使用su、sudo、sudo-i和sudosu命令,每種方法適用于不同場景,需根據(jù)實際需求選擇,使用root權限需謹慎,以免對系統(tǒng)造成損壞
    2024-11-11
  • Linux join命令快速實現(xiàn)從大文件中匹配內(nèi)容

    Linux join命令快速實現(xiàn)從大文件中匹配內(nèi)容

    本文介紹了如何使用Linux命令和join命令進行大數(shù)據(jù)文件的高效匹配,通過對文件進行排序和使用join命令,可以顯著提升匹配效率,同時,還討論了數(shù)據(jù)準備、文件排序、join命令的應用以及數(shù)據(jù)整理的方法
    2025-11-11
  • Linux系統(tǒng)云服務器被入侵排查和解決方法

    Linux系統(tǒng)云服務器被入侵排查和解決方法

    當 Linux 系統(tǒng)的云服務器被入侵時,及時排查和解決問題是防止更大損失的關鍵,所以本文給大家詳細介紹了Linux系統(tǒng)云服務器被入侵排查和解決方法,需要的朋友可以參考下
    2025-11-11
  • Centos7安裝JDK11全過程

    Centos7安裝JDK11全過程

    文章詳細介紹了如何在Linux系統(tǒng)上下載、卸載和安裝JDK 11,包括查看當前JDK版本、卸載舊版本、解壓安裝包、配置環(huán)境變量等步驟
    2026-03-03
  • linux下用cron定時執(zhí)行任務的方法

    linux下用cron定時執(zhí)行任務的方法

    呵呵,比較有用,網(wǎng)上摘抄的。留著備用吧。
    2008-06-06

最新評論

曲沃县| 九江县| 鄱阳县| 弥勒县| 延津县| 灵台县| 博野县| 宿松县| 淄博市| 温泉县| 宁蒗| 怀仁县| 昆山市| 新建县| 都江堰市| 军事| 门头沟区| 石楼县| 抚宁县| 昭苏县| 延安市| 徐闻县| 广水市| 鄢陵县| 拜泉县| 海林市| 原平市| 阿图什市| 台湾省| 铜山县| 庄浪县| 长寿区| 绍兴县| 布尔津县| 乐东| 镇原县| 平阳县| 永仁县| 上饶市| 台北县| 武夷山市|