Use ipmitool to manage IPMI on servers in Linux

Source: Internet
Author: User

1. Introduction

IPMI (Intelligent platform management interface) is a new generation of common interface standards that enable intelligent Hardware Management. You can use IPMI to monitor the physical characteristics of the server, such as temperature, voltage, fan operating status, power supply, and chassis intrusion. The biggest advantage of IPMI is that it is independent of the CPU bios and OS. Therefore, you can monitor the server as long as the power is switched on or off. IPMI is a standard. The most important physical component is BMC (baseboard management controller 1), an embedded management microcontroller, which is equivalent to the "brain" of the entire platform ", IPMI can be used to monitor the data of various sensors and record the logs of various events.

Figure 1

Ipmitool is an IPMI platform management tool that can be used as a command line tool in Linux. It supports the IPMI 1.5 specification (the latest specification is IPMI 2.0 ), it can be used to obtain sensor information, display system logs, and enable remote network switching. Ipmitool can be used in two ways (for example, table 1)

Table 1



Back to Top

2. Prerequisites for using IPMI

To achieve IPMI management for servers, you must meet the following requirements in terms of hardware, OS, and management tools:

2.1 server hardware provides IPMI support

Currently, most servers, such as HP, Dell, and NEC, support IPMI 1.5, but not all servers. Therefore, you should first use the product manual or BIOS to determine whether the server supports IPMI, that is to say, the server must have BMC and other embedded management micro-controllers on the motherboard.

2.2 The operating system provides the corresponding IPMI driver

When the operating system monitors the server's IPMI information, the system kernel must provide corresponding support.Openipmi(IPMI driver) to provide IPMI system interfaces.

2.3 IPMI management tools

This document selects the IPMI platform management tool for command line in Linux.Ipmitool.



Back to Top

3. Implement IPMI management for Linux servers

You can use ipmitool to manage the server's IPMI in either of the following ways: ① using OS to monitor local servers; ② using network to monitor remote servers. This article provides an example of using IPMI to locally obtain the CPU temperature and remotely control the power supply.

3.1 manage local servers

3.1.1 system structure (2)

Figure 2

Features (such as table 2)

Table 2

3.1.2 configure the local operating system to support IPMI

The OS RedHat 9.0 used in this article has provided support for IPMI in the kernel. Here you only need to complete the following steps:

① Load a system module that supports IPMI

Note: you must first load the module so that the kernel can identify the ipmidev device in section 2.

② Create a node for the character device so that ipmitool can access the IPMI system interface through the driver

3.1.3 install ipmitool to obtain CPU temperature information

① Execute the following commands in sequence to install ipmitool

② Use the ipmitool command to obtain the CPU Temperature

3.2 manage remote servers

3.2.1 system structure (3)

Figure 3

Features (such as table 3)

Table 3

3.2.2 write the IP address to the BMC chip on the monitored Server

IPMI remote monitoring is achieved by sending UDP data packets to the network interface (1: ②) connected to BMC. The location of UDP data packets is achieved by writing the IP address to the BMC chip, this requires the local IPMI system interface to complete the connection. First, use steps 3.1.2 and 3.1.3 to implement the local IPMI system interface on the server side and install ipmitool.

Through bmcautoconf that comes with the ipmitool-1.5.9.tar.gz. configure the IPMI Network Interface (IPMI-over-lan) of the monitored server in the sh script (default installation location/usr/local/bin/), and write the IP address and other information to the BMC, the process is as follows:

① Use ipmitool to determine the server's LAN Channel

The result shows that "channel medium type: 802.3 LAN" and Channel 7 is a LAN channel.

Note: Channel 7 of the Intel Shasta spsh4 server corresponds to the eth0 Nic. Therefore, you must select eth0 (M Nic) for IPMI management during network connection.

② Modify the bmcautoconf. Sh script based on the determined LAN channel number and Nic

Note: The above changes are made based on the specific installation location of the LAN channel, corresponding Nic, and ipmitool identified in ①.

③ Run bmcautoconf. Sh to write IP and other information to BMC

④ Determine the result of bmcautoconf. Sh

⑤ Set the network access password

Note: After completing the preceding steps, the IPMI system interface is no longer required on the monitored server. You can uninstall the module in section 3.1.2, you can even reinstall a completely new operating system that is not supported by IPMI.

3.2.3 install ipmitool on the monitoring client and remotely operate the server Power Supply

① Execute the following commands in sequence to install ipmitool

② Use ipmitool command to remotely control server Power Supply

Note: You can also use ipmitool to monitor the fan, chassis, and many other related information. For more information, seeIpmitool manpage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.