[PLUGIN] IPMI for 6.11+


Recommended Posts

10 minutes ago, coded-patter8004 said:

image.thumb.png.7d984c9ec16312483c07ce1f5bd80a0a.png

 

Thank you for reminding me,but seems to be different? it shows  “Auto” ?

set fan control to no and hit apply, the change auto to hdd temp and set you hi and low. you can not change settings while it is running

 

 

Screenshot 2023-12-01 at 7.29.51 PM.png

Edited by spl147
Link to comment

I have released 2023.12.02, If you have tested the Dev release you may need to update the Fans section as I have changed name to FAN123456 for All for Dell systems

 

- Add FAN Control support for Dell systems.

- Add Supermicro X12 options. Thanks to C4Wiz for PR.

- Add ASRock EP2C612WS Support thanks to WillGunn for PR.

- Set shift class in table sorter thanks to kcpants for PR.

- Refactor code to allow easier models+boards to be added.

  • Like 3
Link to comment
3 hours ago, SimonF said:

I have released 2023.12.02, If you have tested the Dev release you may need to update the Fans section as I have changed name to FAN123456 for All for Dell systems

 

- Add FAN Control support for Dell systems.

- Add Supermicro X12 options. Thanks to C4Wiz for PR.

- Add ASRock EP2C612WS Support thanks to WillGunn for PR.

- Set shift class in table sorter thanks to kcpants for PR.

- Refactor code to allow easier models+boards to be added.

Nice,
but is there a possibility to add ASRockRack W680D4U-2L2T/G5
it works fine with the sensors but won't find the fans.
Can i deliver anything to make it easier for you?

Kind regards
Kai

Edited by Dave-Kay
Link to comment
11 minutes ago, Dave-Kay said:

Nice,
but is there a possibility to add ASRockRack W680D4U-2L2T/G5
it works fine with the sensors but won't find the fans.
Can i deliver anything to make it easier for you?

Kind regards
Kai

Have you run the ipmi2json command to create the file for ASRock systems and can you supply the file.

 

root@unraid:/boot/packages# ipmi2json --help

Check ASRock IPMI fan locations using ipmi-raw command and
create a json array for ipmifan script.

Usage: ipmi2json [options]

  -f, --force      force start
      --debug      turn on debugging
      --help       display this help and exit
      --version    output version information and exit

Link to comment
7 hours ago, SimonF said:

I have released 2023.12.02, If you have tested the Dev release you may need to update the Fans section as I have changed name to FAN123456 for All for Dell systems

 

- Add FAN Control support for Dell systems.

- Add Supermicro X12 options. Thanks to C4Wiz for PR.

- Add ASRock EP2C612WS Support thanks to WillGunn for PR.

- Set shift class in table sorter thanks to kcpants for PR.

- Refactor code to allow easier models+boards to be added.

log is showing this: 2023-12-02 11:43:56 Fan:Temp, FAN1234(19%):HDD Temp(39°C), FAN123456(22%):HDD Temp(39°C)

Link to comment
48 minutes ago, SimonF said:

What is defined in here -> cat /boot/config/plugins/ipmi/fan.cfg 

root@Server:~# cat /boot/config/plugins/ipmi/fan.cfg 
FANCONTROL="enable"
FANPOLL="1"
FANIP=""
HDDPOLL="6"
HDDIGNORE="Samsung_SSD_990_PRO_2TB_S73WNJ0W808832E"
HARDDRIVES="enable"
FAN_FAN1234="39"
TEMP_FAN1234="99"
TEMPHI_FAN1234="55"
TEMPLO_FAN1234="35"
FANMAX_FAN1234="32"
FANMIN_FAN1234="7"
FAN_FAN123456="39"
TEMP_FAN123456="99"
TEMPHI_FAN123456="55"
TEMPLO_FAN123456="30"
FANMAX_FAN123456="32"
FANMIN_FAN123456="4"

Link to comment
Just now, spl147 said:

root@Server:~# cat /boot/config/plugins/ipmi/fan.cfg 
FANCONTROL="enable"
FANPOLL="1"
FANIP=""
HDDPOLL="6"
HDDIGNORE="Samsung_SSD_990_PRO_2TB_S73WNJ0W808832E"
HARDDRIVES="enable"
FAN_FAN1234="39"
TEMP_FAN1234="99"
TEMPHI_FAN1234="55"
TEMPLO_FAN1234="35"
FANMAX_FAN1234="32"
FANMIN_FAN1234="7"
FAN_FAN123456="39"
TEMP_FAN123456="99"
TEMPHI_FAN123456="55"
TEMPLO_FAN123456="30"
FANMAX_FAN123456="32"
FANMIN_FAN123456="4"

Can you remove the fan1234 entries then restart fanctl it should only report fan123456 in log

Link to comment

I don't think my patch got incorporated correctly, updating causes the fans to not be controlled correctly because its inserting an extra 01 in the ipmi-raw command between the "raw" prefix and the fan section (8 tuples), so ipmi-raw receives back "rcvd: 01 c7", when it should be getting back "rcvd: 01 00"

Correct command (sets fans to auto):         

ipmi-raw 00 3a 01 00 00 00 00 00 00 00 00

 

Incorrect command (tries to set fan speed):

ipmi-raw 00 3a 01 01 16 16 17 00 12 00 00 00

 

And potentially related, the board.json file that was saved causes the ipmi settings page to fail in an interesting way, the basic/advanced toggle switch shows as a check box, and clicking apply just opens a new window/tab and doesn't actually apply anything.  Deleting my board.json file allows the page to load again.

board.json

{
    "ASRockRack": {
        "raw": "00 3a 01",
        "auto": "00 00 00 00 00 00 00 00",
        "full": "64 64 64 64 64 64 64 64",
        "fans": {
            "CPU1_FAN1": "01",
            "CPU2_FAN1": "01",
            "REAR_FAN1": "01",
            "FAN_POS4": "01",
            "FRNT_FAN1": "01",
            "FAN_POS6": "01",
            "FAN_POS7": "01",
            "FAN_POS8": "01"
        }
    }
}

 

Link to comment

Ok, I got the settings page to load correctly by renaming some of the entries to match the ipmi sensor name that the plugin picks up:

{
    "ASRockRack": {
        "raw": "00 3a 01",
        "auto": "00 00 00 00 00 00 00 00",
        "full": "64 64 64 64 64 64 64 64",
        "fans": {
            "CPU1_FAN1": "01",
            "CPU2_FAN1": "01",
            "REAR_FAN1": "01",
            "FAN_POS4": "01",
            "FRNT_FAN1": "01",
            "FRNT_FAN2": "01",
            "FRNT_FAN3": "01",
            "FRNT_FAN4": "01"
        }
    }
}

I only have CPU1 CPU2 REAR and FRNT_FAN1 plugged in FYI

Link to comment

I was able to get the ipmi2json to work by updating the ipmi_settings_fan.php ASRockRack case to be:

switch($board) {
    case 'ASRock':
    case 'ASRockRack':

      //if board is ASRock
      //check number of physical CPUs
      if( $override == 'disable') {
        $board_model = rtrim(ltrim(shell_exec("dmidecode -qt2|awk -F: '/^\tProduct Name:/ {print $2}'")));
        if ($board_model == "EP2C612 WS") {
          $cmd_count = 0;
        }
        else {
          $cmd_count = (intval(trim(shell_exec("/usr/bin/lscpu | grep 'Socket(s):' | awk '{print $2}'"))) < 2) ? 0 : 1;
        }
      }
      else
        $cmd_count = $ocount;

      $board_file = "$plg_path/board.json";
      $board_file_status = (file_exists($board_file));
      $board_json = ($board_file_status) ? json_decode((file_get_contents($board_file)), true) : [];
      break;
.....

The board's ipmi isn't configued like other boards that are dual socket asrock/asrockrack it seems, so while those need $cmd_count = 1, this one needs $cmd_count = 0;

Edited by Gunny
Link to comment

With the above change, it outputs this for the board.json

{
    "ASRockRack": {
        "raw": "00 3a 01",
        "auto": "00 00 00 00 00 00 00 00",
        "full": "64 64 64 64 64 64 64 64",
        "fans": {
            "CPU1_FAN1": "01",
            "CPU2_FAN1": "01",
            "REAR_FAN1": "01",
            "FRNT_FAN1": "01",
            "FAN_POS6": "01",
            "FAN_POS7": "01",
            "FAN_POS8": "01"
        }
    }
}

 

But that causes the ipmifan script run output this ipmi-raw command

ipmi-raw 00 3a 0116 16 17 12 00 00 00  2>&1;

which is missing the space between 3a 01 and the fan section, and only has 7 elements instead of the necessary 8.

 

running that ipmi-raw command manually (without the redirect of output) yields:

root@UnraidHost:~# ipmi-raw 00 3a 0116 16 17 12 00 00 00
invalid hex byte argument

 

adding the needed space yields:

root@UnraidHost:~# ipmi-raw 00 3a 01 16 16 17 12 00 00 00
rcvd: 01 C7 

which is an error code

 

turning off fan control runs this ipmi-raw command:

ipmi-raw 00 3a 01 00 00 00 00 00 00 00 00  2>&1 >/dev/null &

which does have the correct layout and 8 00's in the data section of the command

 

 

The reason why its missing a space between the raw and hex section is because the $cmd_str concatentation line for asrock/asrockrack is missing a space

 switch($board) {
            case "ASRock":
            case "ASRockRack":
            //compare last value to new value for Asrock boards
            if($board_model == "EP2C612 WS"){
                $hex = ltrim($hex);
            }
            $cmd_str = "ipmi-raw $raw$hex $fanopts 2>&1; ";

it should be $raw $hex not $raw$hex

Edited by Gunny
Link to comment

Through testing the ipmi data section for this motherboard goes to:

00                00                00                  00       00                  00                 00                  00

^CPU1_FAN1  ^CPU2_FAN1  ^REAR_FAN1   ^N/A     ^FRNT_FAN1   ^FRNT_FAN2   ^FRNT_FAN3   ^FRNT_FAN4

 

00          00          00           00      00           00           00           00
^CPU1_FAN1  ^CPU2_FAN1  ^REAR_FAN1   ^N/A    ^FRNT_FAN1   ^FRNT_FAN2   ^FRNT_FAN3   ^FRNT_FAN4

 

 

Manually re-adding in "FAN_POS4": "01" to my board.json representing the N/A word yields a ipmi-raw command with the correct number of fan words in the ipmi data section

 

{
    "ASRockRack": {
        "raw": "00 3a 01",
        "auto": "00 00 00 00 00 00 00 00",
        "full": "64 64 64 64 64 64 64 64",
        "fans": {
            "CPU1_FAN1": "01",
            "CPU2_FAN1": "01",
            "REAR_FAN1": "01",
            "FAN_POS4": "01",
            "FRNT_FAN1": "01",
            "FAN_POS6": "01",
            "FAN_POS7": "01",
            "FAN_POS8": "01"
        }
    }
}

 

Edited by Gunny
Link to comment
4 hours ago, Gunny said:

With the above change, it outputs this for the board.json

{
    "ASRockRack": {
        "raw": "00 3a 01",
        "auto": "00 00 00 00 00 00 00 00",
        "full": "64 64 64 64 64 64 64 64",
        "fans": {
            "CPU1_FAN1": "01",
            "CPU2_FAN1": "01",
            "REAR_FAN1": "01",
            "FRNT_FAN1": "01",
            "FAN_POS6": "01",
            "FAN_POS7": "01",
            "FAN_POS8": "01"
        }
    }
}

 

But that causes the ipmifan script run output this ipmi-raw command

ipmi-raw 00 3a 0116 16 17 12 00 00 00  2>&1;

which is missing the space between 3a 01 and the fan section, and only has 7 elements instead of the necessary 8.

 

running that ipmi-raw command manually (without the redirect of output) yields:

root@UnraidHost:~# ipmi-raw 00 3a 0116 16 17 12 00 00 00
invalid hex byte argument

 

adding the needed space yields:

root@UnraidHost:~# ipmi-raw 00 3a 01 16 16 17 12 00 00 00
rcvd: 01 C7 

which is an error code

 

turning off fan control runs this ipmi-raw command:

ipmi-raw 00 3a 01 00 00 00 00 00 00 00 00  2>&1 >/dev/null &

which does have the correct layout and 8 00's in the data section of the command

 

 

The reason why its missing a space between the raw and hex section is because the $cmd_str concatentation line for asrock/asrockrack is missing a space

 switch($board) {
            case "ASRock":
            case "ASRockRack":
            //compare last value to new value for Asrock boards
            if($board_model == "EP2C612 WS"){
                $hex = ltrim($hex);
            }
            $cmd_str = "ipmi-raw $raw$hex $fanopts 2>&1; ";

it should be $raw $hex not $raw$hex

The ltrim removes the space so should not be needed.

Link to comment
5 hours ago, Gunny said:

I was able to get the ipmi2json to work by updating the ipmi_settings_fan.php ASRockRack case to be:

switch($board) {
    case 'ASRock':
    case 'ASRockRack':

      //if board is ASRock
      //check number of physical CPUs
      if( $override == 'disable') {
        $board_model = rtrim(ltrim(shell_exec("dmidecode -qt2|awk -F: '/^\tProduct Name:/ {print $2}'")));
        if ($board_model == "EP2C612 WS") {
          $cmd_count = 0;
        }
        else {
          $cmd_count = (intval(trim(shell_exec("/usr/bin/lscpu | grep 'Socket(s):' | awk '{print $2}'"))) < 2) ? 0 : 1;
        }
      }
      else
        $cmd_count = $ocount;

      $board_file = "$plg_path/board.json";
      $board_file_status = (file_exists($board_file));
      $board_json = ($board_file_status) ? json_decode((file_get_contents($board_file)), true) : [];
      break;
.....

The board's ipmi isn't configued like other boards that are dual socket asrock/asrockrack it seems, so while those need $cmd_count = 1, this one needs $cmd_count = 0;

Yes missed the lines add board_model

 

$board_model = rtrim(ltrim(shell_exec("dmidecode -qt2|awk -F: '/^\tProduct Name:/ {print $2}'")));

fanlog("Board Model: $board_model");

 

I have created a PR to address the ltrim and board_model.

 

https://patch-diff.githubusercontent.com/raw/SimonFair/IPMI-unRAID/pull/9.diff

 

Will have to look at ipmi2json next. Can you send me your working json fille?

Link to comment

would it be possible to add the ability to use cpu temp as well since dell server fans cool the cpu(s) as well with the same fans?

 

my T430 has 1 fan that cools everything

 

IE: doing a cpu intensive task in a VM will heat up the cpu but fans stay at the min value.

 

or perhaps set fan control back to auto if hdds are spun down?

Edited by spl147
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.