# Comandos IPMITOOL

Link: [https://wiki.joeplaa.com/applications#ipmitool](https://wiki.joeplaa.com/applications#ipmitool)

## Installation

```shellsession
apt update && apt install ipmitool
```

## Configuration

Create a user with ipmi permissions only in Dell iDrac or HP iLO

## Commands

> [https://www.tzulo.com/crm/knowledgebase/47/IPMI-and-IPMITOOL-Cheat-sheet.html](https://www.tzulo.com/crm/knowledgebase/47/IPMI-and-IPMITOOL-Cheat-sheet.html)

### Get all sensor data

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr list full
```

### Get temperature(s)

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr type Temperature
```

### Get fanspeed(s)

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr type Fan
```

Or

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr get Fan1 Fan2 | grep "Sensor Reading"
```

### Get power supply info

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr type 'Power Supply'
```

### Enable auto fan control / disable static mode (Dell)

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x01 0x01
```

### Enable static fan control / disable auto mode (Dell)

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x01 0x00
```

### Set fanspeed 20% (Dell)

See the script for other speeds. The last 4 characters differ.

```shellsession
ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x14
```

### Change system state

```shellsession
ipmitool -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> chassis power <status|on|off|cycle|reset>
```

<div class="code-toolbar" id="bkmrk-"><div class="toolbar"><div class="toolbar-item">  
</div></div></div>