Controlling Server Fan Speed With ipmitool

I recently inherited an IBM 3650 M3 for my home lab – 2 x Intel Xeon E5645, 128GB RAM, 4 x 1.2TB 10K SAS – which is going to make a nice base for a new nested ESXi lab.

One thing that had to be sorted out straight away, on pain of constant nagging, was the noise.

I’m keeping this server in a small hallway closet, but unfortunately with such a light door, it was very audible around the apartment (and with it being an apartment, probably audible to my neighbours too!)

Even running the server in Acoustic mode from the BIOS wasn’t much help. Thankfully I came across ipmitool to help out.

ipmitool (https://github.com/ipmitool/ipmitool) is an open source command line tool for controlling the Intelligent Platform Management Interface, v2.0 of which is a part of the IBM 3650’s Integrated Management Module.

Once installed (sudo apt get ipmitool), and with your IMM available on the network, it’s simply a case of running the below command to configure the fan speeds:

ipmitool -H HOST_IP -U IMM_USERNAME -P IMM_PASSWORD raw 0x3a 0x07 0x01 0x50 0x01

The 3rd hex value is the fan number (three fans, 0x01, 0x02 and 0x03), and the 4th hex value is the speed (0-255, or 0x00 to 0xFF).

I selected a speed of 0x50 for each fan, which is still audible but much more tolerable, and I can spin the fans up and down as need be. Unfortunately the fan speed will reset after a server reboot/shutdown, so might be worth scripting the above into a start-up script.

For Windows users, you can download the Insyde ipmitool from https://support.advantech-bb.com/download/sr/1-1LDVAOC

8 thoughts on “Controlling Server Fan Speed With ipmitool

  1. Holy, this is what I have been looking for, for ages!

    However, in my situation, sometimes I want the fans to be automatically adjusted by the server. I am looking to increase fan speeds only during certain times. Is there a way to go back to automatic adjustments, with out a reboot/shutdown? I have tried to shut down, and reboot the servers to go back to the automated fan control, but, that isn’t working, the servers sit at what I have told them to go to.

  2. Sorry, I never had that requirement so I don’t know. I also don’t have this server anymore, so can’t test for you.

    Are you saying your servers stay at the manual speed even when they are rebooted? I’m almost certain I didn’t have that experience, a reboot would always bring the fans back to dynamic.

    Only example I can find online that might be relevant is below, though it’s for a Dell R710 server, but it seems to imply settings it back to dynamic is possible, maybe the last hex value?

    if [[ $TEMP > $MAXTEMP ]];
    then
    printf “Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)\n”
    ipmitool raw 0x30 0x30 0x01 0x01
    else
    printf “Temperature is OK ($TEMP C), setting fans to 15%%\n”
    ipmitool raw 0x30 0x30 0x01 0x00
    ipmitool raw 0x30 0x30 0x02 0xff 0x09
    fi

    https://gist.github.com/qlyoung/44282a8283879d967b0c4314e7d4fb82

  3. Where do the raw hex values come from? Are they specific to the piece of hardware? I have some Supermicro JBODs that I’d like to ramp down the fan speeds of.

  4. Yes there is a way to control the fans in at specific times. This works from the server itself or from another machine but I haven’t yet found a way to connect directly without having iDrac connected to a switch. It would be nice to just have it all internal and not requiring network connectivity but other than that this works nicely for Dell r620 and r720. I run this from Debian or FreeBSD but something like this could work with strawberry perl on windows and the windows version of ipmitool. On my r720 normal temperature is around 30C while on the r620 it’s around 51C. This will reduce fan speed down to 10% if temperature is below $low and increase in increments of 2% of fan is above $high till 100%.

    #!/usr/bin/perl
    $min = 10;
    $max = 100;
    $low = 55;
    $high = 75;

    $hostname = `hostname`;
    #if ($hostname =~ /720/) {
    $ip = “10.200.10.230”;
    #} else {
    # $ip = “10.200.10.220”;
    #}

    # automatic fan control
    # system(“/usr/bin/ipmitool -I lanplus -H $ip -U root -P pass\@word raw 0x30 0x30 0x01 0x01”);

    # set manual fan control
    system(“/usr/bin/ipmitool -I lanplus -H $ip -U root -P pass\@word raw 0x30 0x30 0x01 0x00”);
    sleep 1;

    $fan_speed = 30;
    while(1) {
    my $temp;
    # print “/usr/bin/ipmitool -I lanplus -H $ip -U root -P pass\@word sdr list full\|”;
    open(CMD,”/usr/bin/ipmitool -I lanplus -H $ip -U root -P pass\@word sdr list full|;
    while() {
    if ($_ =~ /^Temp\s/ && $_ =~ /\s(\d+)\s+degrees/) {
    if ($temp < $1) {
    $temp = $1;
    }
    }
    # print $_;
    }
    close(CMD);
    if ($temp $min) {
    $fan_speed-=2;
    } elsif ($temp > $high && $fan_speed < $max) {
    $fan_speed+=2;
    }
    $hex = sprintf("0x%x", $fan_speed);
    print "temp=${temp}C, setting fans to $fan_speed\% $hex";
    system("/usr/bin/ipmitool -I lanplus -H $ip -U root -P pass\@word raw 0x30 0x30 02 0xff $hex");
    sleep 20;
    }

    1. .. and again missing a < between $temp < $min. I should have used <code&ht; Maybe the moderator can edit this for me and remove these corrective posts. Thanks.

  5. So I have a 3650 M5 running unraid. The noise isn’t necessarily a problem but if I could quiet it down I would like to. I just downloaded the ipmitool plugin and was able to run ipmitool raw without the user and password. Curious of a way to run this automatically so I don’t have to worry about the server overheating under a load

Leave a Reply

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