[SOLVED] IPMI Tool error after v8 upgrade

@no-usernames-left hope this one can help you :

Background : We use several Dell R730XD that uses non-Dell nvme cards with Samsung Pro drives in a ZFS pool, mirror + stripe scheme... This non standard setup automatically sets the fan at 15000+ rpm. Quite annoying. Since v 8.x in Proxmox, the script was spitting out the warning, source of this thread.

This script gets executed by cron at 5 min intervals
You need to create a user in IDRAC for impi access
Temperature are in celsius
Fan speeds are in %
The script tries to set the fan speed to obtain the right temperature at exhaust by raising or lowering fan %.
Has been quite stable since last year - your mileage may vary :) no warranty !

Bash:
#!/bin/bash

# Fancontrol v1.1 2022-09-15 15:42

# Define variables

MAX_FAN=90
MIN_FAN=20
HIGH_TEMP=37
LOW_TEMP=35
SPEED_STEP=10
IDRAC_IP=10.0.0.1
IPMI_USER=fancontrol
IPMI_PASSWORD=yoursupercomplexpassword

# Define Functions

ENABLE_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x01 0x00 > /dev/null 2>&1
}


GET_TEMP ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD  sensor reading "Exhaust Temp"|sed 's/[^0-9]//g'
}


SET_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x02 0xff $FAN_SETTING > /dev/null 2>&1
}

# File to save the last fan speed

 [ -f fan_speed.last ] || echo $MIN_FAN > fan_speed.last

FAN_SPEED=$(<fan_speed.last)

#-----------------------------------------------------------------------------------------

CURRENT_TEMP=$(GET_TEMP)                # get the current temperature

 if (($CURRENT_TEMP > $HIGH_TEMP)) ; then
    FAN_SPEED=$(expr $FAN_SPEED + $SPEED_STEP)
     if (($FAN_SPEED > $MAX_FAN)) ; then
                FAN_SPEED=$MAX_FAN
        fi
 fi

 if (($CURRENT_TEMP < $LOW_TEMP)) ; then
     FAN_SPEED=$(expr $FAN_SPEED - $SPEED_STEP)
     if (($FAN_SPEED < $MIN_FAN)) ; then
         FAN_SPEED=$MIN_FAN
     fi
 fi

FAN_SETTING=$(printf "0x"'%x\n' $FAN_SPEED)
ENABLE_FAN
SET_FAN

logger -t FanControl "Current Temperature" $CURRENT_TEMP"C" "Fans at" $FAN_SPEED"%"
echo $FAN_SPEED > fan_speed.last

exit 0

Happy new year :)

Francis
 
  • Like
Reactions: qbit and khalilio
@no-usernames-left hope this one can help you :

Background : We use several Dell R730XD that uses non-Dell nvme cards with Samsung Pro drives in a ZFS pool, mirror + stripe scheme... This non standard setup automatically sets the fan at 15000+ rpm. Quite annoying. Since v 8.x in Proxmox, the script was spitting out the warning, source of this thread.

This script gets executed by cron at 5 min intervals
You need to create a user in IDRAC for impi access
Temperature are in celsius
Fan speeds are in %
The script tries to set the fan speed to obtain the right temperature at exhaust by raising or lowering fan %.
Has been quite stable since last year - your mileage may vary :) no warranty !

Bash:
#!/bin/bash

# Fancontrol v1.1 2022-09-15 15:42

# Define variables

MAX_FAN=90
MIN_FAN=20
HIGH_TEMP=37
LOW_TEMP=35
SPEED_STEP=10
IDRAC_IP=10.0.0.1
IPMI_USER=fancontrol
IPMI_PASSWORD=yoursupercomplexpassword

# Define Functions

ENABLE_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x01 0x00 > /dev/null 2>&1
}


GET_TEMP ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD  sensor reading "Exhaust Temp"|sed 's/[^0-9]//g'
}


SET_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x02 0xff $FAN_SETTING > /dev/null 2>&1
}

# File to save the last fan speed

 [ -f fan_speed.last ] || echo $MIN_FAN > fan_speed.last

FAN_SPEED=$(<fan_speed.last)

#-----------------------------------------------------------------------------------------

CURRENT_TEMP=$(GET_TEMP)                # get the current temperature

 if (($CURRENT_TEMP > $HIGH_TEMP)) ; then
    FAN_SPEED=$(expr $FAN_SPEED + $SPEED_STEP)
     if (($FAN_SPEED > $MAX_FAN)) ; then
                FAN_SPEED=$MAX_FAN
        fi
 fi

 if (($CURRENT_TEMP < $LOW_TEMP)) ; then
     FAN_SPEED=$(expr $FAN_SPEED - $SPEED_STEP)
     if (($FAN_SPEED < $MIN_FAN)) ; then
         FAN_SPEED=$MIN_FAN
     fi
 fi

FAN_SETTING=$(printf "0x"'%x\n' $FAN_SPEED)
ENABLE_FAN
SET_FAN

logger -t FanControl "Current Temperature" $CURRENT_TEMP"C" "Fans at" $FAN_SPEED"%"
echo $FAN_SPEED > fan_speed.last

exit 0

Happy new year :)

Francis
This is great! Thanks for sharing.
I am currently on R740xd iDRAC 3.30.30.30 and this script works fine. Will it support higher iDRAC firmware versions?
 
@no-usernames-left hope this one can help you :
Thank you for sharing this, Francis! I'm worried that updating the fan every 5 min is going to risk the CPU being cooked for 4 minutes before the fans are updated, and by performing some load testing with stress I realized the CPU can go from 40 to 80 degrees in 15 seconds when the CPU load spikes (such as a backup starting).

After posting here, I came across this, which I think ticks basically all of the boxes:
https://github.com/nmaggioni/r710-fan-controller/

I noticed you're using network access to your IPMI. You might want to consider running it in local-access mode (-I open). This might even mean that you don't need to expose the IPMI interface to the network at all. This is important in the event that the interface is on a network not entirely under your control, since iDRAC 6 (what my machines have) is hopelessly outdated and full of vulnerabilities.
 
Last edited:
It is fixed in Debian Experimental, you may try to download the package from there and install if by hand via:

Code:
cd /tmp
wget http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-5_amd64.deb
dpkg -i ipmitool_1.8.19-5_amd64.deb
You are a GOD amongst Us.

Thank you
 
Based on @LnxBil workaroud and @acdoussan link, this is what have worked for me :

Code:
wget -O /usr/share/misc/enterprise-numbers.txt https://www.iana.org/assignments/enterprise-numbers.txt

No reboot needed - Our script using impitool to control fans is back to silence
I created an account just to say thanks for this solution. Works flawlessly and my ears can once again rest.
 
link is dead, 1.8.19-6 doesn't work either, and I've tried downloading this file from http://www.iana.org/assignments/enterprise-numbers.txt, I still get the following

Code:
root@sm1:/tmp# ipmitool user list
IPMI command failed: Invalid data field in request

anyone know of any other fixes?
got same problem
# ipmitool user list
IPMI command failed: Parameter out of range

None of mentioned solutions works ....
 
@no-usernames-left hope this one can help you :

Background : We use several Dell R730XD that uses non-Dell nvme cards with Samsung Pro drives in a ZFS pool, mirror + stripe scheme... This non standard setup automatically sets the fan at 15000+ rpm. Quite annoying. Since v 8.x in Proxmox, the script was spitting out the warning, source of this thread.

This script gets executed by cron at 5 min intervals
You need to create a user in IDRAC for impi access
Temperature are in celsius
Fan speeds are in %
The script tries to set the fan speed to obtain the right temperature at exhaust by raising or lowering fan %.
Has been quite stable since last year - your mileage may vary :) no warranty !

Bash:
#!/bin/bash

# Fancontrol v1.1 2022-09-15 15:42

# Define variables

MAX_FAN=90
MIN_FAN=20
HIGH_TEMP=37
LOW_TEMP=35
SPEED_STEP=10
IDRAC_IP=10.0.0.1
IPMI_USER=fancontrol
IPMI_PASSWORD=yoursupercomplexpassword

# Define Functions

ENABLE_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x01 0x00 > /dev/null 2>&1
}


GET_TEMP ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD  sensor reading "Exhaust Temp"|sed 's/[^0-9]//g'
}


SET_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x02 0xff $FAN_SETTING > /dev/null 2>&1
}

# File to save the last fan speed

 [ -f fan_speed.last ] || echo $MIN_FAN > fan_speed.last

FAN_SPEED=$(<fan_speed.last)

#-----------------------------------------------------------------------------------------

CURRENT_TEMP=$(GET_TEMP)                # get the current temperature

 if (($CURRENT_TEMP > $HIGH_TEMP)) ; then
    FAN_SPEED=$(expr $FAN_SPEED + $SPEED_STEP)
     if (($FAN_SPEED > $MAX_FAN)) ; then
                FAN_SPEED=$MAX_FAN
        fi
 fi

 if (($CURRENT_TEMP < $LOW_TEMP)) ; then
     FAN_SPEED=$(expr $FAN_SPEED - $SPEED_STEP)
     if (($FAN_SPEED < $MIN_FAN)) ; then
         FAN_SPEED=$MIN_FAN
     fi
 fi

FAN_SETTING=$(printf "0x"'%x\n' $FAN_SPEED)
ENABLE_FAN
SET_FAN

logger -t FanControl "Current Temperature" $CURRENT_TEMP"C" "Fans at" $FAN_SPEED"%"
echo $FAN_SPEED > fan_speed.last

exit 0

Happy new year :)

Francis
Hi!

Here is what the script returns on y end. Any cues??

root@router0:/tmp# ./ipmi_fan.sh
Error: Unable to establish IPMI v2 / RMCP+ session
./ipmi_fan.sh: line 45: (:) > 37: syntax error: operand expected (error token is "> 37")
./ipmi_fan.sh: line 52: (:) < 35: syntax error: operand expected (error token is "< 35")
 
Hi!

Here is what the script returns on y end. Any cues??

root@router0:/tmp# ./ipmi_fan.sh
Error: Unable to establish IPMI v2 / RMCP+ session
./ipmi_fan.sh: line 45: :)) > 37: syntax error: operand expected (error token is "> 37")
./ipmi_fan.sh: line 52: :)) < 35: syntax error: operand expected (error token is "< 35")
There is no > or < in shell, you need to use the comparators -lt and -gt. Please refer to the test manpage.
 
i seem to get
--2024-04-05 12:25:08-- http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-6_amd64.deb
Resolving ftp.debian.org (ftp.debian.org)... 199.232.26.132, 2a04:4e42:43::644
Connecting to ftp.debian.org (ftp.debian.org)|199.232.26.132|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-04-05 12:25:08 ERROR 404: Not Found.
when i try to download ipmitool on my server could anyone help with this
 
i seem to get
--2024-04-05 12:25:08-- http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-6_amd64.deb
Resolving ftp.debian.org (ftp.debian.org)... 199.232.26.132, 2a04:4e42:43::644
Connecting to ftp.debian.org (ftp.debian.org)|199.232.26.132|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-04-05 12:25:08 ERROR 404: Not Found.
when i try to download ipmitool on my server could anyone help with this
Package in Debian Experimental changed, just download the file manually, as shown in here.
 
after trying the command this is all i got

root@ibm3650:~# wget http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-7_amd64.deb
--2024-04-05 13:35:05-- http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-7_amd64.deb
Resolving ftp.debian.org (ftp.debian.org)... 199.232.26.132, 2a04:4e42:43::644
Connecting to ftp.debian.org (ftp.debian.org)|199.232.26.132|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1972336 (1.9M) [application/vnd.debian.binary-package]
Saving to: ‘ipmitool_1.8.19-7_amd64.deb’

ipmitool_1.8.19-7_amd 100%[=======================>] 1.88M 11.6MB/s in 0.2s

2024-04-05 13:35:05 (11.6 MB/s) - ‘ipmitool_1.8.19-7_amd64.deb’ saved [1972336/1972336]

root@ibm3650:~# ipmitool
-bash: ipmitool: command not found
 
after trying the command this is all i got

root@ibm3650:~# wget http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-7_amd64.deb
--2024-04-05 13:35:05-- http://ftp.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-7_amd64.deb
Resolving ftp.debian.org (ftp.debian.org)... 199.232.26.132, 2a04:4e42:43::644
Connecting to ftp.debian.org (ftp.debian.org)|199.232.26.132|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1972336 (1.9M) [application/vnd.debian.binary-package]
Saving to: ‘ipmitool_1.8.19-7_amd64.deb’

ipmitool_1.8.19-7_amd 100%[=======================>] 1.88M 11.6MB/s in 0.2s

2024-04-05 13:35:05 (11.6 MB/s) - ‘ipmitool_1.8.19-7_amd64.deb’ saved [1972336/1972336]

root@ibm3650:~# ipmitool
-bash: ipmitool: command not found
you forgot to install the package, you just downloaded it
 
ahh it worked thanks for all the help this is the first week of me having a server so i am still getting stuff ready
apparently there is no such file or directory when i enter the command ipmitool or any other ipmitool command
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!