IPMI Linux command

When working with Linux systems and servers, you often need to remotely monitor and troubleshoot hardware and other components. The Intelligent Platforms Management Interface (IPMI) makes this easy from the command line. An IPMItool is required to access the features of IPMI, and you can perform most tasks remotely.

This manual covers the installation of the IPMItool on Linux and Debian systems and shows various commands that are available to you when working with IPMI.

How to install IPMItool

To install IPMItool on Ubuntu, update the package repository and then run the following command:

$ sudo suitable To install ipmitool

The IPMI daemon should start automatically.

For CentOS, start updating the repositories.

$ Yum update

Run the following command to install IPMItool:

$ sudo Install yum OpenIPMI ipmitool

After installation, proceed to enable IPMItool access with the following command:

$ /slut/chkconfig ipmi

First steps with the IPMItool

The IPMI Linux tool has several commands categorized into different sections including enclosure, sensor output and more.

1. IPMI LAN configuration commands

When accessing remote devices and servers, IPMItool allows creating a LAN channel and all its configurations can be done on the terminal.

Run the following command to set the LAN to use a static IP address:

$ ipmitool lan set to 1 ipsrc static

You now have to set the actual IP address for the LAN. Replace the following with your preferred one.

$ ipmitool lan set to 1 IP address 192.168.0.11

Next, set the netmask for the channel. In this case we set our IP to class C. Our netmask is:

$ ipmitool lan set to 1 Netmask 255.255.255.0

You also need to configure the default gateway and MAC address as shown below:

$ ipmitool lan set to 1 defgw ipaddr < default gateway IP >
$ ipmitool lan set to 1 defgw macaddr <MAC address>

Run the following command to enable BMC generated ARP replies:

$ ipmitool lan set to 1 arp reply to

The final step is to define your authentication rules.

$ ipmitool lan set to 1 Authentication ADMIN MD5

You can check the set configurations with the following command:

$ Print ipmitool LAN 1

The previous commands created a LAN channel and the next step is to define the users who will access the channel.

Use the following commands to set up a user named admin with the password test01:

$ ipmitool user set to Surname 2 Administrator
$ ipmitool user set to password 2

Here 2 is the userid of the admin user. You will also need to grant and grant admin access to the new user as shown below:

$ Access to the ipmitool channel set 1 2 shortcut= a ipmi= a call up= a privilege=4

$ ipmitool user enable 2

You can view the user list with the following command:

$ ipmitool user list

2. Sensor output commands

There is a command to list the various sensors on your system.

To list all the names of the sensors, use the following command:

$ ipmitool sdr list

Use the following command to list all sensor types:

$ ipmitool sdr Type list

Use the following command to list all fan sensors in the system:

$ ipmitool sdr Type fan

To list all types of power sensors, use the following command:

$ ipmitool sdr Type “Power supply”

Use the following command to display the sensor types for temperature:

$ ipmitool sdr Type temperature

3. Logging Commands

Generating and analyzing system event logs is one of an administrator’s tasks that can be simplified with the IPMItool.

Here’s a quick cheat sheet for most logging commands:

ipmitool sel info: Displays general system event log details.

ipmitool sel list: Displays the system event logs.

ipmitool sel clear: It clears the event logs.

4. General IPMI Commands

The IPMItool has countless commands. However, the most common ones you will encounter are:

To power on the server, use the following command:

$ ipmitool -I lanplus -H <your server domain> -P <Your password> housing switched on

Use the following command to turn off the server:

$ ipmitool -I lanplus -H <your server domain> -P <Your password> Switch off the housing

Use the following command to check the status of your server:

$ ipmitool -I lanplus -H <your server domain> -P <Your password> chassis status

To enable the SOL system console, use the following command:

$ ipmitool -I lanplus -H <your server domain> -P <Your password> Activate Sol

Conclusion

This article explained how to install IPMItool on Ubuntu and CentOS. Also, we discussed some basic IPMItool commands. However, these are just some of the things you can achieve with the IPMItool. Using the man page, you can play with different commands that help to perform different tasks. Hopefully this article has set the pace for you.

Related Posts