[Plugin] IPMI for unRAID 6.1+


Recommended Posts

On 4/10/2021 at 5:44 AM, cakes044 said:

Hi All,

 

Here is the forked repo with the details of my "fix", keep in mind this is only for X570D4U and X570D4U-2L2T users, I purposely didn't include this to be backwards compatible because I didn't have those boards to do the proper testing or the time to make this backwards compatible.

 

This is the commit in question that has my "fix", I also fixed some minor bugs with the shell commands:

https://github.com/lucasteligioridis/IPMI-unRAID/commit/49281fd8

 

I can't quite remember if the ipmi2json script works flawlessly or not, I may have hacked in some values on the first run, full disclosure I haven't used that one since I first put it together and used it.

 

But the ipmifan script works wonders with these boards, haven't had a problem with it since implementation.

You essentially want to copy the two files mentioned from here:

https://github.com/lucasteligioridis/IPMI-unRAID/tree/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts

 

Into the correct location on the Unraid system, which is here:

- /usr/local/emhttp/plugins/ipmi/scripts

 

You will have to restart the ipmifan service in the Unraid UI and it all should hopefully work, at the very worse the ipmi2json script might not work perfectly as intended, but it will at least generate some of the json correctly. Let me know how it goes, happy to help further. I'm not at home at the moment and don't have SSH access to validate the above just yet.

 

To have this fix "permanent" I just copy the ipmifan script into the above directory whenever the machine boots, because the plugins get reloaded each time Unraid restarts so the old code will be restored. Obviously any updates to the plugin will have the same effect. If I get more time I'd love to fix this into a proper patch and merge it upstream.

Thanks for posting this! I'm really excited to use this!

 

The problem right now is I have no idea how to get the files from github (Do I copy the scripts and make a .txt file? What are the extensions I need to make them?) and I can't find /usr/local/emhttp/plugins/ipmi/scripts anywhere (is it on the flash drive?).

 

If you don't have time to make detailed instructions, that's okay. If you end up having more time to patch this into the IPMI plugin itself, I might just wait till that happens. 

Link to comment

The fan script works nicely, but the ipmi2json especially for the configure button does not work at all for me, what changes need to be done aswell to get it working for the X570D4U-2L2T

 

cheers,

Horfic

Link to comment
21 hours ago, ramblinreck47 said:

Thanks for posting this! I'm really excited to use this!

 

The problem right now is I have no idea how to get the files from github (Do I copy the scripts and make a .txt file? What are the extensions I need to make them?) and I can't find /usr/local/emhttp/plugins/ipmi/scripts anywhere (is it on the flash drive?).

 

If you don't have time to make detailed instructions, that's okay. If you end up having more time to patch this into the IPMI plugin itself, I might just wait till that happens. 

The two files you need to modify are
/usr/sbin/ipmifan
/usr/sbin/ipmi2json
but they get overwritten each time you restart Unraid (not very often for me so copying the files back isn't an issue)

They don't need a file extension, they are marked via chmod as a executable and if you open them in a text editor you'll see they are shell scripts, text files that get fed into a specific interpreter.

After you change the ipmifan file, you need to turn off the fan control setting then turn it back on so it reads in the new script file.

Link to comment

I think my question got buried previously...

Any chance of this working on a Dell Poweredge T420, or is it just still for those few boards mentioned in the OP?

If not, does anyone know of a good way to control the fans on a Gen 12 Poweredge based on HDD temps?

Link to comment
9 hours ago, Elmojo said:

I think my question got buried previously...

Any chance of this working on a Dell Poweredge T420, or is it just still for those few boards mentioned in the OP?

If not, does anyone know of a good way to control the fans on a Gen 12 Poweredge based on HDD temps?

If you can find the correct IPMI-RAW command to control the fans and what each value does, its pretty straight forward to modify the scripts to support your system.

Link to comment
9 hours ago, Gunny said:

If you can find the correct IPMI-RAW command to control the fans and what each value does, its pretty straight forward to modify the scripts to support your system.

Ok, yeah, I have that info.

I've never edited a script, or even used one for that matter. Do you know of a guide that would be helpful for how to start?

Link to comment

Finally got it working on my Asrock X570D4U-2L2T board.

 

Step by step guide.

  1.  Login to your ASRockRack IPMI web ui (BMC)
  2. Go to Settings -> FAN Settings -> FAN Mode
  3. In the lower section "Set Fan Control Mode" set all fans to "Manual" and press the "Save control mode" button
  4. Open a ssh session to your unraid server or use the unraid web terminal
  5. Go to the following directory by entering the command 
    cd /usr/local/emhttp/plugins/ipmi/scripts
  6. Download the custom ipmi2json file
    wget https://raw.githubusercontent.com/lucasteligioridis/IPMI-unRAID/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts/ipmi2json
  7. Set the permission for the file
    chmod 755 ipmi2json.1
  8. Exchange the original file with the custom one
    mv ipmi2json ipmi2json.ori && mv ipmi2json.1 ipmi2json
  9. Download the custom ipmifan file
    wget https://raw.githubusercontent.com/lucasteligioridis/IPMI-unRAID/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts/ipmifan

     

  10. Set the permission for the file

  11. chmod 755 ipmifan.1
  12. Exchange the original file with the custom one
    mv ipmifan ipmifan.ori && mv ipmifan.1 ipmifan
  13. Login to your unraid web ui
  14. Go to Settings -> IPMI -> Fan Control
  15. Set "Fan Control" to "No" and press the button "APPLY"
  16. Press now the "CONFIGURE" button and wait until its finished
  17. When finished, press the "DONE" button
  18. Configure now your "Fan Settings" which fan should be linked to which temperature sensor, e.g. HDD Temperature
  19. Start the fan control again by setting "Fan Control" to "Yes" and press the "APPLY" button
  20. Enjoy

 

NOTES

  • What is missing is to make the files persistent, so with this guide your would need to repeat step 5-11 every time you restart your unraid server and then stop the fan control and start it again to load the activate the changed files
  • If you do not set in the BMC your fan control mode to manual, the configure script in unraid will not work properly.
  • Many thanks again to @cakes044 who made effort to get the raw ipmi values for the board.

 

cheers,

Horfic

Edited by Horfic
  • Thanks 2
Link to comment

5-11 can be simplified to 2 commands if you don't care for (or even better backed up) the original files. 
 

1: Needs to be done once to generate the json. Don't need after you have fans showing up unless you want to re-configure. 

curl -o '/usr/local/emhttp/plugins/ipmi/scripts/ipmi2json' -L 'https://raw.githubusercontent.com/lucasteligioridis/IPMI-unRAID/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts/ipmi2json' && chmod 755 '/usr/local/emhttp/plugins/ipmi/scripts/ipmi2json'


2: This is the one that needs on every restart + stop the fan control and start it again

curl -o '/usr/local/emhttp/plugins/ipmi/scripts/ipmifan' -L 'https://raw.githubusercontent.com/lucasteligioridis/IPMI-unRAID/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts/ipmifan' && chmod 755 '/usr/local/emhttp/plugins/ipmi/scripts/ipmifan'

 

I also just keep a copy of ipmifan and cp it over & chmod using User Scripts plugin on start. 

  • Thanks 1
Link to comment
On 4/24/2021 at 2:29 PM, Horfic said:

Download the custom ipmifan file

  1. 
    https://raw.githubusercontent.com/lucasteligioridis/IPMI-unRAID/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts/ipmifan

 

Thanks for these! I just wanted to say that #9 is missing wget in front of the web address. I couldn't figure out what was going wrong until I figured that out.

Link to comment

Hi all, 

 

Need some help getting IPMI setup for my unraid server.  When I run the configuration it doesn't find anything, and on the config page there aren't any fans showing.  My motherboard is a ASRock B460M Steel Legend.  Any tips on how to get this configured and working properly would be much appreciated!

 

Screenshot at Apr 28 11-08-55.png

Screenshot at Apr 28 11-10-13.png

Link to comment

Awesome plugin!  Thanks a lot for making it!!  Is it possible to display more than 4 sensors in the footer?  I have 9 different sensors that I'd like to include and plenty of real estate in the footer to fit them all.  

  • Like 1
Link to comment

Agreed^

 

Also being able to rename the sensors (fans in particular) would be very helpful.

 

Along these same lines, is it possible to add multiple sensors to the fan control. Basically my mobo only has 1 PWM control. I can set the fans to be quite and everything is fine as long as it is not under load, if  the drives start working the fans need to spin up, ok fine.

 

The issue is that if the CPU's with passive heat sinks start working they also need the fans to spin up but right now I have to pick only one of those.

 

It would be nice if it could have use multiple sensors for fan control and simply set the fans to whatever is higher. Thus allowing it to spin the fans up for either the CPU or Hard drives.

 

Bonus points to add even more sensors as I could spin the fans up if the HBA or memory starting getting hot for example etc.

Link to comment

Sadly I've had no luck getting my Asrock x470D4U working. 

 

I can successfully run the 'configure' (which detects the fans and speeds them up etc), but activating the temperature controls and starting fan control does nothing.

 

I can confirm sending a command like: "ipmi-raw -h 192.168.1.11 -u admin -p admin 00 3a 01 00 32 48 48 64 00 00 00" works just fine.

 

Does anyone use this board, or can help me figure this out?

 

Many thanks.

Link to comment
Posted (edited)
On 5/4/2021 at 6:47 AM, TexasUnraid said:

Agreed^

 

Also being able to rename the sensors (fans in particular) would be very helpful.

 

Along these same lines, is it possible to add multiple sensors to the fan control. Basically my mobo only has 1 PWM control. I can set the fans to be quite and everything is fine as long as it is not under load, if  the drives start working the fans need to spin up, ok fine.

 

The issue is that if the CPU's with passive heat sinks start working they also need the fans to spin up but right now I have to pick only one of those.

 

It would be nice if it could have use multiple sensors for fan control and simply set the fans to whatever is higher. Thus allowing it to spin the fans up for either the CPU or Hard drives.

 

Bonus points to add even more sensors as I could spin the fans up if the HBA or memory starting getting hot for example etc.

 

I second this, multiple fan profiles would be awesome, In my 24bay 4U case, under heavy disk load I spin up the fan wall to pull more air through the front to keep the drives cool, under a CPU intensive workload (when the drives are often spun down), I would also like to spin up the fan wall, and pull more cool air into the case.

 

Renaming would be nice also, but not as important as above :)

Edited by jbear
Link to comment
On 4/28/2021 at 1:16 PM, Cpmiller22 said:

Hi all, 

 

Need some help getting IPMI setup for my unraid server.  When I run the configuration it doesn't find anything, and on the config page there aren't any fans showing.  My motherboard is a ASRock B460M Steel Legend.  Any tips on how to get this configured and working properly would be much appreciated!

 

Screenshot at Apr 28 11-08-55.png

Screenshot at Apr 28 11-10-13.png

I’m positive that motherboard doesn’t have IPMI.

Link to comment
  • 1 month later...

Been running this plugin successfully on my Super Micro X9DRI-LN4F+ for a couple of years but just noticed today that it's not working. No status displays, no content on the readings tab. I don't know when it stopped working, but it couldn't have been that long ago as the slightly louder and faster fan speed just stuck out audibly to me today.

 

Log output after restarting system:

Quote

2021-06-27 13:40:07 Starting Fan Control
2021-06-27 13:40:07 Setting fans to full speed
2021-06-27 13:43:12 Fan:Temp, FAN1234( 5%):(0°C)

 

I've previously noticed an issue where the plugin doesn't seem to function when the system comes up from a power failure. We did just have such a power failure a few days ago, but I've since powered down the server, unplugged the power supply and then brought it back up.

 

No sensors seem to come up in the IPMI plugin settings anymore. In Display Settings, both Global and Dashboard have only "Select all" with no sensors listed and the only choice in the pop-up menu for footer display is "none" - I'd previously had multiple items selected for footer display, including temps and fan speeds.

Edited by Espressomatic
Link to comment
  • 1 month later...

EDIT: After playing around with it for another 4 hours. i found a solution. I updated the bios and the IPMI firmware and it seems to be working now. Thanks to everyone else in the thread who helped get me to this point!

Could someone help me get this working on a supermicro x9dhr-if-nv? I have installed the plugin, and set my ipmi up, which the plugin says it is successfully connected to. I can see all my sensors, including temps and fan speeds in the plugin, however my fan settings section only has an option for which hard drive to poll.     

image.png

image.thumb.png.14c0718bb8a62a7161be157f4017c57d.png

image.png

image.png

image.png

Edited by weilii
Link to comment
On 4/10/2021 at 3:44 AM, cakes044 said:

Hi All,

 

Here is the forked repo with the details of my "fix", keep in mind this is only for X570D4U and X570D4U-2L2T users, I purposely didn't include this to be backwards compatible because I didn't have those boards to do the proper testing or the time to make this backwards compatible.

 

This is the commit in question that has my "fix", I also fixed some minor bugs with the shell commands:

https://github.com/lucasteligioridis/IPMI-unRAID/commit/49281fd8

 

I can't quite remember if the ipmi2json script works flawlessly or not, I may have hacked in some values on the first run, full disclosure I haven't used that one since I first put it together and used it.

 

But the ipmifan script works wonders with these boards, haven't had a problem with it since implementation.

You essentially want to copy the two files mentioned from here:

https://github.com/lucasteligioridis/IPMI-unRAID/tree/master/source/ipmi/usr/local/emhttp/plugins/ipmi/scripts

 

Into the correct location on the Unraid system, which is here:

- /usr/local/emhttp/plugins/ipmi/scripts

 

You will have to restart the ipmifan service in the Unraid UI and it all should hopefully work, at the very worse the ipmi2json script might not work perfectly as intended, but it will at least generate some of the json correctly. Let me know how it goes, happy to help further. I'm not at home at the moment and don't have SSH access to validate the above just yet.

 

To have this fix "permanent" I just copy the ipmifan script into the above directory whenever the machine boots, because the plugins get reloaded each time Unraid restarts so the old code will be restored. Obviously any updates to the plugin will have the same effect. If I get more time I'd love to fix this into a proper patch and merge it upstream.

I just wanna say thank you.

I got it working on the asrockrack x470d4u. So it is backwards compatible.

Link to comment
  • 2 weeks later...

I am not super familiar with IPMI does anyone know why I am having the following issue? When I hit the configure button it does not appear to actually detect the fans based on what it is showing me. I followed the post that Vendigroth created but it did not seem to remedy the issue. I am also successfully connected to between unraid and the BMC. 

 

 

Motherboard: ASRockRack X470D4U2-2T

BMC Version: 1.8.3

BIOS Version: 3.4.0

Unraid Version: 6.9.2

 

 

Checking IPMI fan Locations...

Location 0-1: none

Location 0-2: none

Location 0-3: none

Location 0-4: none

Location 0-5: none

Location 0-6: none

Location 0-7: none

Location 0-8: none

Location 0-9: none

Location 0-10: none

Location 0-11: none

Location 0-12: none

Location 0-13: none

Location 0-14: none

Location 0-15: none

Location 0-16: none

Saving board configuration...

Link to comment

Hey folks.  I just upgraded my UnRAID server to use a new SuperMicro board and am trying to get the IPMI tools working properly.  It identifies the SuperMicro IPMI branding and can read all of the sensors without issue.  But I'm having an issue with actually changing anything in the config.  Any change on any tab I make is ignored even after clicking Apply, then Done.  When I go back to the IPMI settings page it is all set to the defaults again.  I tried searching in this thread but didn't see anything about a config not being saved.

 

When looking at the Firefox console, I'm seeing a DOMException whenever I browse to the IPMI settings page.


image.png.66d70100b8d17460e9ed58f1e732f771.png

 

The function that is throwing the exception is this one:

 

function decData() {
    $('#PASSWORD').val(atob($('#PASSWORD').val()));
}

 

Not sure if that is the reason things are not working for me, but it's the only error I see when attempting to make changes/save the config.

 

I had previously been using AutoFan and System Temp plugins from Dynamix, but I removed them just in case they were causing issues.  They are pretty much worthless now anyways since everything is handled via IPMI on this board.

 

Specs:

 

UnRAID 6.9.2 Pro

Xeon Silver 4110

SuperMicro X11SPL-F Motherboard

BIOS Version: 3.4 (Latest)

BMC Firmware Version: 1.73.05 (Latest)

 

EDIT:  It seems that even though I had the Network Connections set to No, it was still trying to autofill my UnRAID user/pass in the BMC connection and submitting it whenever I clicked apply for unrelated settings.  After disabling autofill for the UnRAID site in Firefox I was able to make changes.

 

Edited by b3rs3rk
Solved?
Link to comment
  • 3 weeks later...

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.