Useful Remote IPMI Commands For Managing Servers

In this post I will be showing you some of the useful IPMI commands which can be used to remotely interact with your servers for things such as power cycles, serial over lan, and more. This guide will assume that your server is already setup and capable of receiving IPMI commands.

Server Power Management

The following ipmitool commands can be used to check power status, turn the power on/off for your server remotely, power cycle it (gracefully if possible), and reset (reset as if you unplugged/plugged the server back in).

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power status
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power on
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power off
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power cycle
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power reset

On a side note, you can also see if somebody rebooted your server using this:

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis restart_cause

Server Sensor Values

With the commands below you can check on the servers sensors. This includes things such as wattage, temperatures, etc. It will even tell you (usually) if one of those values is past the safe threshold by marking it as critical (cr).

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> sensor list
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> sdr

Force Server Boot Into BIOS/PXE

The next ipmitool commands can be used to force your server to boot into PXE or BIOS during next reboot, this does NOT work on HP Proliant servers! For that you will need to use different commands. After running these commands you will still need to reboot or power cycle your server for it to actually boot into the desired target.

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis bootdev bios
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis bootparam set bootflag force_bios;
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis bootdev pxe
ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis bootparam set bootflag force_pxe;

Check Server SEL Log

You can use the following command to check the SEL on your server, this may include errors such as memory issues or other hardware problems that your server may be experiencing.

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> sel elist

SOL Session

If you need to then you can connect to your server with a SOL session (serial over lan), this will let you get into your server even if SSH isn’t working. It is basically the same as plugging in a monitor and keyboard. You can do this with the ipmitool commands below.

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> sol activate

If somebody else is already connected and you would like to boot them off, you can also use the following to terminate their session.

ipmitool -I lanplus -H <ip-address> -U <username> -P <password> sol deactivate

I hope you enjoyed this guide on using the ipmitool, please don’t forget to like/comment/share. Thanks!

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *