天天看點

IPMI Introuduce

        IPMI(Intelligent Platform Management Interface)是一種帶外(out-of-band)管理接口,IPMI的核心是一個BMC(Baseboard Manager Controller),其并不依賴于伺服器的處理器、BIOS或作業系統來工作,可謂非常地獨立,是一個單獨在系統内運作的無代理管理子系統,隻要有BMC與IPMI固件其便可開始工作,而BMC通常是一個安裝在伺服器主機闆上的獨立的闆卡,也有伺服器主機闆提供對IPMI支援的。(IPMI目前已不維護,逐漸由RedFish替代, RedFish目前支援IPMI2.0和PMCI)。

  • IPMI的硬體連接配接

下圖為簡要的連接配接方案

4個主要部分為remote,BMC,SERVER,pcie card。其中BMC通過IPMB(I2C硬體接口)與PCIE闆卡連接配接,軟體上BMC OS通過ipmi driver與pcie card内部的firmware通信,主要傳輸控制流。PCIE card與SERVER保持原有連接配接, 傳輸資料流。BMC通過LPC(Low Pin Count Bus)連接配接SERVER可以對cpu進行管理,屬于System interface。關于remote 部分,是指其他server遠端通路BMC,主要通過LAN通信,中間經過KVM over IP(Keyboard Video Mouse)或者SOL (Serial Over LAN)轉換器轉換成網絡通信方式。

IPMI Introuduce

實物圖

IPMI Introuduce

下圖為IPMI 2.0 spec中的連接配接結構原圖

IPMI Introuduce
  • IPMI的系統結構

如下圖,其中Remote Access負責接受遠端Server的控制協定,Local Access負責本地控制協定,其中system interface包括KCS(Keyboard Controller  Style),BT(block transfer)等負責與system cpu通信,mgmt Busses主要負責device 比如pcie card相關的通信。

IPMI Introuduce

具體參考 

https://www.intel.cn/c ontent/ www/cn/zh/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1- 1.html

software

  • ipmitools(user mode tools):

負責調用ipmi driver進行管理,或者通過網絡進行控制,即可以再remote端使用ipmitools經過BMC裡通過kipmi0程序(屬于ipmitools一部分)進行資料轉發。

ipmitools控制指令比如

溫度檢視

IPMI Introuduce

檢視風扇

IPMI Introuduce
  • linux ipmi driver:

位于driver/char/ipmi,包括以下幾個部分

ipmi_msghandler - This is the central piece of software for the IPMI system. It handles all messages, message timing, and responses. The IPMI users tie into this, and the IPMI physical interfaces (called System Management Interfaces, or SMIs) also tie in here. This provides the kernelland interface for IPMI, but does not provide an interface for use by application processes.

ipmi_devintf - This provides a userland IOCTL interface for the IPMI driver, each open file for this device ties in to the message handler as an IPMI user.

ipmi_si - A driver for various system interfaces. This supports KCS, SMIC, and BT interfaces. Unless you have an SMBus interface or your own custom interface, you probably need to use this.

ipmi_ssif - A driver for accessing BMCs on the SMBus. It uses the I2C kernel driver’s SMBus interfaces to send and receive IPMI messages over the SMBus.

ipmi_powernv - A driver for access BMCs on POWERNV systems.

ipmi_watchdog - IPMI requires systems to have a very capable watchdog timer. This driver implements the standard Linux watchdog timer interface on top of the IPMI message handler.

ipmi_poweroff - Some systems support the ability to be turned off via IPMI commands.

bt-bmc - This is not part of the main driver, but instead a driver for accessing a BMC-side interface of a BT interface. It is used on BMCs running Linux to provide an interface to the host.

  • pcie card firmware

firmware負責從IPMB(i2c)接收到command并進行處理,傳回結果。

x86->pcie card的調用:

ipmi sensor path:

|++++bmc  os+++++++|                              |++PCIE card firmware++|

application->/driver/ipmi->IPMB(i2c hardware)->firmware->method

IPMI VS Redfish

Redfish是被用于取代IPMI的新方案。Redfish目前支援IPMI2.0以及PMCI

PMCI(Platform Management Components Intercommunication)

  • PMCI連接配接結構

如下圖,中間是BMC,Redfish是運作在BMC上的網絡服務。

IPMI Introuduce
  • PMCI系統結構
IPMI Introuduce

具體參考

https://www.dmtf.org/sites/default/files/DSP2015_2.0.0%20%20%E8%AF%91%E6%96%87.pdf

繼續閱讀