[Plugin] IPMI for unRAID 6.1+


Recommended Posts

It works a little bit on my Dell server, but only for monitoring, not fan control, sadly. :(
I would really love to eventually have a version that does fully allow auto fan control
on Dell servers. As many as there are out there, it seems like it would be worth developing. Maybe it's harder than it sounds?

Link to comment

You can also manually set a constant fan speed through the terminal using the IPMI command. That's what I've been doing for the past couple years on my T420. I just found a speed that moves enough air to keep the rig cool, but isn't so loud that I can't stand to be in the room with it, then set that speed and forget it.  My office is generally fairly stable on temps, and so is the server, so this approach has worked fine for me. If you have really dynamic loads, or an environment that gets warmer without notice, this could be a really bad idea.

 

In case you're interested, here's the IPMI commands to set a fan speed manually:

Enable manual fan control:  ipmitool raw 0x30 0x30 0x01 0x00

DISABLE manual fan control: ipmitool raw 0x30 0x30 0x01 0x01

Check 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x01 0x16 0x05 0x00 0x00 0x00
Disable 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
Enable 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00

The response data is:
16 05 00 00 00 05 00 01 00 00 (Disabled)
16 05 00 00 00 05 00 00 00 00 (Enabled)

 

TO CONTROL FANS:

20%    ipmitool raw 0x30 0x30 0x02 0xff 0x14   
19%    ipmitool raw 0x30 0x30 0x02 0xff 0x13
18%    ipmitool raw 0x30 0x30 0x02 0xff 0x12   
17%    ipmitool raw 0x30 0x30 0x02 0xff 0x11
16%    ipmitool raw 0x30 0x30 0x02 0xff 0x10    
15%    ipmitool raw 0x30 0x30 0x02 0xff 0xF       
14%    ipmitool raw 0x30 0x30 0x02 0xff 0xE    
13%    ipmitool raw 0x30 0x30 0x02 0xff 0xD    
12%    ipmitool raw 0x30 0x30 0x02 0xff 0xC
11%    ipmitool raw 0x30 0x30 0x02 0xff 0xB   
10%    ipmitool raw 0x30 0x30 0x02 0xff 0xA    
8%    ipmitool raw 0x30 0x30 0x02 0xff 0x8

 

  • Thanks 1
Link to comment
On 10/2/2022 at 9:36 AM, Elmojo said:

You can also manually set a constant fan speed through the terminal using the IPMI command. That's what I've been doing for the past couple years on my T420. I just found a speed that moves enough air to keep the rig cool, but isn't so loud that I can't stand to be in the room with it, then set that speed and forget it.  My office is generally fairly stable on temps, and so is the server, so this approach has worked fine for me. If you have really dynamic loads, or an environment that gets warmer without notice, this could be a really bad idea.

 

In case you're interested, here's the IPMI commands to set a fan speed manually:

Enable manual fan control:  ipmitool raw 0x30 0x30 0x01 0x00

DISABLE manual fan control: ipmitool raw 0x30 0x30 0x01 0x01

Check 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x01 0x16 0x05 0x00 0x00 0x00
Disable 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
Enable 3rd party PCIe card response:  ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00

The response data is:
16 05 00 00 00 05 00 01 00 00 (Disabled)
16 05 00 00 00 05 00 00 00 00 (Enabled)

 

TO CONTROL FANS:

20%    ipmitool raw 0x30 0x30 0x02 0xff 0x14   
19%    ipmitool raw 0x30 0x30 0x02 0xff 0x13
18%    ipmitool raw 0x30 0x30 0x02 0xff 0x12   
17%    ipmitool raw 0x30 0x30 0x02 0xff 0x11
16%    ipmitool raw 0x30 0x30 0x02 0xff 0x10    
15%    ipmitool raw 0x30 0x30 0x02 0xff 0xF       
14%    ipmitool raw 0x30 0x30 0x02 0xff 0xE    
13%    ipmitool raw 0x30 0x30 0x02 0xff 0xD    
12%    ipmitool raw 0x30 0x30 0x02 0xff 0xC
11%    ipmitool raw 0x30 0x30 0x02 0xff 0xB   
10%    ipmitool raw 0x30 0x30 0x02 0xff 0xA    
8%    ipmitool raw 0x30 0x30 0x02 0xff 0x8

 

If you know what IPMI commands you need, you can do what I did and modify this plug-in’s php file to use your motherboard’s version of the commands. Works perfectly for me. 

Link to comment
4 minutes ago, Gunny said:

If you know what IPMI commands you need, you can do what I did and modify this plug-in’s php file to use your motherboard’s version of the commands. Works perfectly for me. 

Good idea, but I no longer have a need for this, since I now have a T630, and it does a good job of handling fan speeds itself.

Link to comment
13 minutes ago, Elmojo said:

Good idea, but I no longer have a need for this, since I now have a T630, and it does a good job of handling fan speeds itself.

For @bushbashathen, if you follow my comment chain ending in here:

you can see the files I now use, so if you want, you can use the ipmi command info posted by @Elmojo above to modify your files in a similar way to make them work for you board.  Just make sure to save your modified files somewhere as by default they will get overwritten on unraid reboots

Link to comment

I wrote a User Script to automatically replace the files and restart the ipmi service on reboot:
 

#!/bin/bash
cp /mnt/user/ipmifan /usr/local/emhttp/plugins/ipmi/scripts/ipmifan
cp /mnt/user/ipmi2json /usr/local/emhttp/plugins/ipmi/scripts/ipmi2json

/usr/local/emhttp/plugins/ipmi/scripts/fanctrl_stop
/usr/local/emhttp/plugins/ipmi/scripts/fanctrl_start

 

Link to comment
Good idea, but I no longer have a need for this, since I now have a T630, and it does a good job of handling fan speeds itself.
Thank you both, this stuff is foreign to me so I'll check it out. Although I also use a T630, but I've got my fan set to a constant because I couldn't figure out why the fan wasn't ramping up with my hdd temps increasing.

Sent from my SM-S908E using Tapatalk

Link to comment

I'm getting the following error after installing the plugin and attempting to open the settings page. Any help would be appreciated.

 

Fatal error: escapeshellarg(): Input string contains NULL bytes in /usr/local/emhttp/plugins/ipmi/include/ipmi_options.php on line 27

 

Edit: nevermind, solved it. Used midnight commander to navigate to the impi.cfg file and deleted the entries I typed in for "User" and "Password". 

Edited by BeaverTerror
Link to comment
  • 3 weeks later...
On 10/7/2022 at 9:47 AM, BeaverTerror said:

I'm getting the following error after installing the plugin and attempting to open the settings page. Any help would be appreciated.

 

Fatal error: escapeshellarg(): Input string contains NULL bytes in /usr/local/emhttp/plugins/ipmi/include/ipmi_options.php on line 27

 

Edit: nevermind, solved it. Used midnight commander to navigate to the impi.cfg file and deleted the entries I typed in for "User" and "Password". 

Hello I am having the same issue. Can you please tell me where the impi.cfg file is located? I tried to uninstall/install ipmi-tool and still get the exact errors. I think put in the wrong UN/PW. It was working good, before I tired to mess with the settings page. 

Link to comment

ASRock X470D4U Write up.

I barely know what I am doing so I will not answer most questions. This is just a quick write up to help some other poor soul that is lost.

 

After installing IMPI Tools, you need to then install IPMI. I did it with Nerd Tools. IPMI Tools is just a fan control basically.

Now time to get the drivers installed.

In terminal run “sensor-detect”. Answer “Yes” (by pressing Enter) to every question except the last prompt- you do not need to automatically generate the config file.

The output will be pretty long, and result in the something that looks like the following. Copy this block of text – you’ll need it in the next step.

 

#----cut here----

# Chip drivers

modprobe coretemp

modprobe nct6775

/usr/bin/sensors -s

#----cut here----

 

Open unraids go file.

nano /boot/config/go

 

Take the lines that start with modprobe from the sensors-detect output and add them to your ‘go’ file. Do not add in the ‘/user/bin/sensors -s’ line.

Save and quit nano (Ctrl-X, Yes)

Reboot your unRAID server. (Or, alternatively, you can run the modprobe commands from the command line to load the kernel modules without rebooting).

Credit goes to:  https://kmwoley.com/blog/controlling-case-fans-based-on-hard-drive-temperature/

 

Installing the correct scripts.

 

Now you should be able to follow this:

https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=984253

This will get the correct scripts in place to make the app work. You should be able to see fans when you use the config button in the fan control of IPMI Tool.

The explanation for this is credited to: https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=974728

 

Finishing up.

The fan control should be able to see the fans and control them. Need to make it permanent so when the sever reboots the files we just installed get put back again. I downloaded them to “cd /mnt/user/ “ and then used the wget and chmod from above.

Remember that you can just use “v” in the terminal to list things.

If you don’t have “User Scripts” installed then get to it. Then use this script from Gunny and set it to run at array start.

https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=1175892

 

Fan settings:

The fan speeds and temperature settings need to be set correctly or your fans will just run full out.

Seems the min for ASRock with Noctua fans is 30%. Check these links out.

https://www.truenas.com/community/resources/how-to-change-ipmi-sensor-thresholds-using-ipmitool.35/

 

https://forums.servethehome.com/index.php?threads/asrock-rack-bmc-fan-control.26941/

 

These are my settings.

297603810_Fansettings.thumb.PNG.ec11b2f9598b471e492c82b089fb746a.PNG

 

 

 

I still have to mess with things to get the fans to read in the right position. My CPU fan is listed one down when configuring. But it works and the server is not screaming from the other room. Hope this helps someone.

 

Edited by _krazy_
Fixed Links
Link to comment
  • 2 weeks later...

I’ve running a SuperMicro X11SCA-F, and I’ve installed this plugin, but none of the sensors show in the dashboard.

Only one that shows is one HDD temp sensor.

Under the settings I’ve selected Motherboard = Supermicro, and Model = X11.

 

Am I missing something else? Perhaps in the config to map the sensors?

Link to comment

Hi, I recently installed this plugin and everything was working fine until yesterday.

 

when I go to the IPMI plugin setting I get this error `Fatal error: escapeshellarg(): Input string contains NULL bytes in /usr/local/emhttp/plugins/ipmi/include/ipmi_options.php on line 27`

 

I have rebooted, removed the plugin and reinstalled, nothing seems to work.

 

any ideas on how to fix this?

 

EDIT Fixed.  I sshed to the server and edit the ipmi.cfg in /boot/config/plugins/ipmi and removed the username and password fields 

Edited by mayberts
Link to comment
  • 4 weeks later...
On 11/21/2022 at 8:05 PM, te5s3rakt said:

I’ve running a SuperMicro X11SCA-F, and I’ve installed this plugin, but none of the sensors show in the dashboard.

Only one that shows is one HDD temp sensor.

Under the settings I’ve selected Motherboard = Supermicro, and Model = X11.

 

Am I missing something else? Perhaps in the config to map the sensors?

 

I've been using this successfully for a X10 Supermicro for years. Just today I noticed all the sensors are missing except for the HDD. And the fan controls have no effect. It all used to work great. Did you find a solution? 

Link to comment

Hi guys

I'm running a SuperMicro board and it doesn't like my Noctua fans, they run too slowly. I've adjusted the curves in the config file to 200,300,400 for lower thresholds - as recommended by SuperMicro themselves (if unsupported) but that just floods the system with fan-speed errors and makes them sound like they're starting and stopping constantly. 

As it is, I have to set it to "full speed" to not have fluctuations in noise levels. 

Not sure how to go about fixing this any more. 

 

Here's what SuperMicro wrote: 

 

IPMI FAN thresholds:

Linux:

$ sudo ipmitool sensor thresh FAN1 lower 200 300 400
Locating sensor record 'FAN1'...
Setting sensor "FAN1" Lower Non-Recoverable threshold to 200.000
Setting sensor "FAN1" Lower Critical threshold to 300.000
Setting sensor "FAN1" Lower Non-Critical threshold to 400.000
$ sudo ipmitool sensor thresh FAN5 lower 200 300 400
Locating sensor record 'FAN5'...
Setting sensor "FAN5" Lower Non-Recoverable threshold to 200.000
Setting sensor "FAN5" Lower Critical threshold to 300.000
Setting sensor "FAN5" Lower Non-Critical threshold to 400.000

 

Now as I said, I modified the FAN values I could find in the config and set the fan-profile in IPMI (SuperMicros own) to "standard" and it just kept start/stopping the fans. 

Please let me know if anyone has a solution to this, other than not using Noctua fans. 

Link to comment
59 minutes ago, JorgeB said:

If you have fan control enabled set the minimum fan speed to value high enough that won't trigger the critical speed warning, and resulting fan speed up.


Yeah that works. Was worried about fan noise but raising the floor to 39 it remains silent under load.. so yay. :) 

  • Like 1
Link to comment
On 12/25/2022 at 4:30 AM, JorgeB said:

If you have fan control enabled set the minimum fan speed to value high enough that won't trigger the critical speed warning, and resulting fan speed up.

How does one do this?  I am new to IPMI on SuperMicro and am at a loss on how to configure the minimum fan speed.

Link to comment
On 11/11/2022 at 12:21 AM, _krazy_ said:

ASRock X470D4U Write up.

I barely know what I am doing so I will not answer most questions. This is just a quick write up to help some other poor soul that is lost.

 

After installing IMPI Tools, you need to then install IPMI. I did it with Nerd Tools. IPMI Tools is just a fan control basically.

Now time to get the drivers installed.

In terminal run “sensor-detect”. Answer “Yes” (by pressing Enter) to every question except the last prompt- you do not need to automatically generate the config file.

The output will be pretty long, and result in the something that looks like the following. Copy this block of text – you’ll need it in the next step.

 

#----cut here----

# Chip drivers

modprobe coretemp

modprobe nct6775

/usr/bin/sensors -s

#----cut here----

 

Open unraids go file.

nano /boot/config/go

 

Take the lines that start with modprobe from the sensors-detect output and add them to your ‘go’ file. Do not add in the ‘/user/bin/sensors -s’ line.

Save and quit nano (Ctrl-X, Yes)

Reboot your unRAID server. (Or, alternatively, you can run the modprobe commands from the command line to load the kernel modules without rebooting).

Credit goes to:  https://kmwoley.com/blog/controlling-case-fans-based-on-hard-drive-temperature/

 

Installing the correct scripts.

 

Now you should be able to follow this:

https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=984253

This will get the correct scripts in place to make the app work. You should be able to see fans when you use the config button in the fan control of IPMI Tool.

The explanation for this is credited to: https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=974728

 

Finishing up.

The fan control should be able to see the fans and control them. Need to make it permanent so when the sever reboots the files we just installed get put back again. I downloaded them to “cd /mnt/user/ “ and then used the wget and chmod from above.

Remember that you can just use “v” in the terminal to list things.

If you don’t have “User Scripts” installed then get to it. Then use this script from Gunny and set it to run at array start.

https://forums.unraid.net/topic/38108-plugin-ipmi-for-unraid-61/?do=findComment&comment=1175892

 

Fan settings:

The fan speeds and temperature settings need to be set correctly or your fans will just run full out.

Seems the min for ASRock with Noctua fans is 30%. Check these links out.

https://www.truenas.com/community/resources/how-to-change-ipmi-sensor-thresholds-using-ipmitool.35/

 

https://forums.servethehome.com/index.php?threads/asrock-rack-bmc-fan-control.26941/

 

These are my settings.

297603810_Fansettings.thumb.PNG.ec11b2f9598b471e492c82b089fb746a.PNG

 

 

 

I still have to mess with things to get the fans to read in the right position. My CPU fan is listed one down when configuring. But it works and the server is not screaming from the other room. Hope this helps someone.

 

 

I almost have the same board as you I tried your guide but I can't get it to work. The sensor-detect command does not exist and there is no "ipmi" only in nerdtools only something called "impi-tools" can you please be more specific? :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.