Using IPMI to control/monitor Linux servers

Source: Internet
Author: User

1 IPMI Overview

IPMI provides a lot of rich functionality, and the features I use, say plain English, are:

1, obtain the hardware information of this device: including CPU and motherboard temperature, voltage, fan speed.

2, on device A, through the command, control remote device B, power on, shutdown, restart. (see if this is a little impulse to do bad things, haha)

The introduction of IPMI, Basic principles, and prerequisites, can be described in [1], very detailed and smooth.

[1]: Using Ipmitool to implement the IPMI management of the server under the Linux system http://www.ibm.com/developerworks/cn/linux/l-ipmi/

1.1 Prerequisites for use:

Due to the relative independence of the IPMI functionality from the OS and hardware, it is possible to use the many capabilities provided by IPMI in any software and hardware environment, as long as the following three points are met.

BMC chip + IPMI module load + ipmitool

1.2 methods to determine if IPMI must be satisfied:

Cat/var/log/messages | grep BMC, check if the boot has print found BMC chip information, if not stated that the hardware environment does not support the BMC chip;

Lsmod | grep IPMI to see if the module is loaded, load the corresponding module in the/LIB/MODULES/2.*.*/KERNEL/DRIVERS/CHAR/IPMI directory, and install the IPMI kernel module without this directory;

Ipmitool Help to see if the User Configuration tool is installed.

1.3 Two types of use:

Local invocation: The local environment must meet the above three points.

Remote Call: Call system, only need to have ipmitool, called system, must have BMC chip + IPMI module. For remote calls, the BMC chip of the called system simply writes the required configuration information, even if the system replaces the software system that does not have the IPMI module, the configuration information will not be erased and changed in the BMC chip, still can provide the function that is called remotely.

2 use of IPMI2.1 Ipmitool Instructions for use:

Ipmitool help;ipmitool Commands Help;ipmitool Commands para Help

Http://linux.die.net/man/1/ipmitool

2.2 Get local hardware information:

Ipmitool SDR

Of course, the IPMI local call also provides a lot of rich features, I have only used this one, hey.

2.3 Calling frequently used commands remotely (remote switching machine):two points of note for remote control of the 2.3.1 BMC Chip

Physical network port: IPMI relies on the physical gateway to accept IPMI instructions, and in the hardware specification it is generally stated which of the physical network ports the BMC chip shares or exclusive. In general, a physical network port is shared with the eth0 port, but it is also possible that the motherboard is designed to have a single network port for the BMC chip, so the network connection of the shared eth0 port (or exclusive network port) must be guaranteed, and the IPMI IP is in the same segment as the eth0 (or exclusive network) IP.

Channel: BMC Chip Although provides a lot of channel, but it seems that a model of the chip can only use a channel, usually channel 1, if Channel 1 is not available, you can try other channel, Which channel is used in this chip I understand that it should also be in the hardware specification.

2.3.2 Configuring IPMI-called/monitor-side BMC chips:

The control side needs to configure LAN information, user information

Ipmitool LAN Set 1 ipsrc static #配置IP地址源为手动配置

Ipmitool LAN Set 1 ipaddr 192.168.0.1 #配置IP地址 (requires same network segment as the shared network port IP address)

Ipmitool LAN Set 1 netmask 255.255.255.0 #配置子网掩码

Ipmitool LAN Set 1 DEFGW ipaddr 192.168.0.100 #配置默认网关 (no gateways available)

Ipmitool LAN set 1 access on #打开该通道 (multiple executions do not affect management side management)

Ipmitool LAN set 1 access off #关闭该通道

Ipmitool LAN Set 1 user #激活该通道的用户 (1 for channel number)

Ipmitool user List 1 #查看channel 1 users

Ipmitool User set name 1 admin #设置用户名, 1 is the UserID.

Ipmitool user Set password 1 111111 #设置密码, 1 is the UserID.

Ipmitool User enabled 1 #激活用户

Ipmitool User Priv 1 4 1 #设置用户为管理员权限, 1 is a userid.

2.3.3 Invoke/Monitor side remote execution command:

Ipmitool-i lan-h 192.168.0.100-u admin-p 111111 Power status #查看电源状态

Ipmitool-i lan-h 192.168.0.100-u admin-p 111111 Power Off/down #关机

Ipmitool-i lan-h 192.168.0.100-u admin-p 111111 Power on/up #开机

Ipmitool-i lan-h 192.168.0.100-u admin-p 111111 Power Reset #重启

Using IPMI to control/monitor Linux servers

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.