Home Configuring fan speed with IPMI
Post
Cancel

Configuring fan speed with IPMI

Introduction

How to control your fan speed on a supermicro X9/10/11 server with IPMI. Changing the fan thresh hold for proper warnings and making a script so that it sets your fans to the correct speed every boot.

Install

Installing the ipmitool on a debian based system.

sudo apt install ipmitool

Logging into the server IPMI interface

Then you can log into the shell.

ipmitool -H <ip of ipmi> -U <username> -P <password> shell

Command to control the fans

raw 0x30 0x70 0x66 0x01 0x<z> 0x<n>

or

ipmitool -H <ip of ipmi> -U <username> -P <password> raw 0x30 0x70 0x66 0x01 0x<z> 0x<n>

  • where “z” is the zone (0 or 1)
  • where “n” is the duty cycle (0x00 … 0x64), this is how fast the fans spin in 65 increments. 0x00 is 0% speed, 0x32 is 50%, and 0x64 is 100%.
  • The 0x30 0x70 0x66 0x01 are the fans
  • CPU or System fans, labelled with a number (e.g., FAN1, FAN2, etc.) - zone 0
  • Peripheral zone fans, labelled with a letter (e.g., FANA, FANB, etc.) - zone 1

I picked raw 0x30 0x70 0x66 0x01 0x0 0x07. This puts my fans at about 5900 RPM for my 1U server and keeps the CPU at 43C under normal load for a router.

  • Note: you may need to log into your IPMI interface and change your fan mode to full (Configuration > Fan Mode). If you do not do this your server may disreguard your changes after a few minutes.

Adjusting thresh hold for the sensors

This will let the monitoring of the fan speed to be correct, incase the speed does go below or above our limits we want to have a proper warning for it. In our shell you can run sdr entity 29 and this will list all your fan headers. Next follow the commands below but replace FANX with each of your fans, so FAN1, FAN2, … FAN7. A reboot might be required for the changes to reflect on the system.

sensor thresh FAN1 lower 4000 4250 4500

sensor thresh FAN1 upper 12500 13000 15000

  • 4000 is the lower non-recoverable value
  • 4250 is the lower critical value
  • 4500 is the lower non-critical value
  • 12500 is the upper non-critical value
  • 13000 is the upper critical value
  • 15000 is the upper non-recoverable value

Run as a script on opnsense

Using this documentation for OPNsense, place the script at /usr/local/etc/rc.syshook.d/start/. Name the file 50-fancontrol or 50-ipmifanspeed, after the dash is just so you know what script is for. The 50 tells what order it starts, making sure other system files start first and 50 is used for plugins, figured that would fine. I would put it in early but since we are trying to access the IPMI IP, we need the script to run after networking has started which happens in early. This is the script I put in the file, just replace it with your ip, username, password, and fan settings. If you are controlling two different zones, just make a new line in the script.

1
2
3
#!/bin/sh

ipmitool -H <ip> -U <username> -P <password> raw 0x30 0x70 0x66 0x01 0x0 0x07
This post is licensed under CC BY 4.0 by the author.