Script to control fan speed in response to hard drive temperatures

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
The SuperMicro FAQ posted earlier just says it applies to X10 MBs. Silent on X9. So maybe out of luck? See here: http://www.supermicro.com/support/faqs/faq.cfm?faq=20882

I've tried it with a number of different X9, X10 and X11 boards. But the X9's and X10s were all E5 boards and the X11s were all Xeon-D. Perhaps its no-love for the E3 boards?

Sorry, don't know the answer.

Could be a good follow-up for you on the SM support board.

@PigLover,

Your article on ServeTheHome, has the wrong zone in the second example.

Also, I've worked something out on the duty cycle commands.

Code:
ipmitool raw 0x30 0x70 0x66 0x01 0x<z> 0x<n>
- where "z" is the zone (0 0r 1)
- where "n" is the duty cycle (0x00..0x64)


Actually,

"0x" means "hexadecimal", so if you don't use "0x" then you get decimal, which means, as the range is 0x00 to 0x64, which is 0..100, which means that the value is just a percent.

ipmitool raw 0x30 0x70 0x66 0x01 <zone> <duty_cycle_percent>

ie:

ipmitool raw 0x30 0x70 0x66 0x01 1 100

is zone 1 @ 100%

ipmitool raw 0x30 0x70 0x66 0x01 0 30

is zone 0 @ 30%

The other ing is that I believe the lowest specified duty cycle is 30%, on my Noctua's 20% works fine, but 10% would cause the fans to stall

Additionally, I've been testing CPU/HD fan control. I want to be able to control the HD fans, and let the system control the System fans based on the CPU temperature.

By having the HD fans on FANA (Peripheral Zone) and the Exhaust CPU fans on the other headers, this seems to be accomplished when you set the Fan Mode to Optimal, and control the Peripheral Zone's Duty Cycle (ie Zone 1 not Zone 0).

I've currently confirmed that in Optimal mode, the Peripheral fans can be set to 100% and 30% for a prolonged period (15-30 minutes), without being reset by the BMC. I have not yet confirmed that the BMC will control the system fans at full CPU load, but the interesting was as I dialed down the HD fans, the system sensors must've gotten hotter, because the system then dialed up the other fans (cpu and exhaust), leading to a cold CPU, and I guess a board which is satisfying its thermal probes.

A good result so far I think
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I've modified Kevin Horton's basic fan controller script. I had to correct a few issues with Seagate drives, and I've made it a bit more flexible. It now has a debug mode, as well as a loop mode, so that you can play with it in an ssh session without having to have cron going.

To use this script, have your HD fans connected to FANA. The "fan mode" you select in IPMI will then control your CPU/Exhaust fans. I use Optimal mode (mode #2), personally, and I've verified that the FANA header behaves correctly in this mode.

You can use this command to set Optimal mode:
ipmitool raw 0x30 0x45 0x01 0x02

Once you have confirmed that its working for you in a terminal session, you can disable debug mode, and loop mode, and then configure it to run as a cron job. Or alternatively, disable debug mode and configure it to run at startup, like Glorius1's script. The cron job would ensure that if the script were to crash... it would be restarted again.

My intention is next to get Glorius1's PID script working :)

Update 2016-08-18:
I updated the script a tiny bit to deal with two issues I found.
1) HeavyIO is not compatible, so the script starts by setting Optimal mode
2) This is not compatible with X9, so I've changed the description
3) Sometimes the fans don't spin down/up fast enough causing the BMC to be reset unneccessarily. I've increased the BMC reset test delay to 10 seconds, to avoid this.
4) fixed a bug where the date would not be changed in loop mode


Code:
#!/usr/local/bin/perl

# This script works on SuperMicro X9 and X10 IPMI motherboards to control FANA Peripheral
# Zone fan speed in response to maximum hard drive temperature.

# To use this correctly, you should connect all your PWM HD fans, by splitters if necessary to the FANA header.
# Case and Exhaust fans should then be connected to the numbered (ie CPU based) headers.  This script will then control the
# HD fans in response to the HD temp, and allow the system to control the other fans in response to the CPU temp.

# It should be set as a cron job to run on roughly a three minute interval, or alternatively
# you can set a loop_sleep value, and it will loop indefinately after loop_sleep seconds.

# you can see debug output by setting the debug_mode value to a greater value than 0. higher
# values are more detailed.

# Remember to adjust the configuration values below.

# In order for these duty cycle changes to work, you need to ensure that you’ve adjusted your fan thresholds as per:
# https://forums.freenas.org/index.php?threads/how-to-change-sensor-thresholds-with-ipmi-using-ipmitool.23571/

# The original version of this script was developed by Kevin Horton and can be found at:
# https://forums.freenas.org/index.php?threads/script-to-control-fan-speed-in-response-to-hard-drive-temperatures.41294/page-3#post-282683

# This version was modified by myself (stux), to support systems where the HD fans are connected to
# the peripheral fan headers (ie FANA). I corrected a number of issues with reading the temperature from Seagate
# drives, as well as made the temperature configurable, corrected a few timing issues, and added the loop_seconds, max_allowed_temp and
# debug constructs

# More information on CPU/Peripheral Zone can be found in this post:
# https://forums.freenas.org/index.php?threads/thermal-and-accoustical-design-validation.28364/

# And the Duty Cycle/Zone commands are found in these posts
# https://forums.freenas.org/index.php?threads/script-to-control-fan-speed-in-response-to-hard-drive-temperatures.41294/page-4#post-289940
# https://forums.freenas.org/index.php?threads/script-to-control-fan-speed-in-response-to-hard-drive-temperatures.41294/page-4#post-290054
# https://forums.servethehome.com/index.php?resources/supermicro-x9-x10-x11-fan-speed-control.20/


# Version History
#--------------------
# 1.x Kevin's scripts
# 2.0 stux: initial changes to support a FANA/Zone 1 based system
# 2.1 stux: added initial setting to Optimal mode. Increased delay before reset to 10 seconds. Fixed date/time logging bug


# if loop_sleep is non-zero, then we'll never exit. Its how long, in seconds, we should sleep each iteration...

$loop_sleep = 180; # 0 for no looping. 180 for 3 minute looping (suggested)
$debug = 1;    # 0 for no debug. 1..4 for verbosity


# edit the following values
$number_of_hard_drives = 8;
$hd_designator = "/dev/ada";
$min_fan_speed = 300;
$max_fan_speed = 1400;
$max_allowed_temp = 38;    # celsius. you will hit 100% duty cycle when you HDs hit this temp.

$LogFile = '/root/HD_TempLog.txt';
$min_fan_speed *= 1.4;
$max_fan_speed *= 0.8;

# edit nothing below this line

use POSIX qw(strftime);


# go to Optimal mode
`ipmitool raw 0x30 0x45 0x01 2`;
sleep 1;

do {

#build datestring
$datestring = strftime "%F %H:%M:%S", localtime;

open (LOGFILE, ">>$LogFile");

$max_temp = 0;


foreach $item (0..$number_of_hard_drives-1) {
  $command = "/usr/local/sbin/smartctl -A $hd_designator$item | grep Temperature_Celsius";

  if( $debug > 3) {
    print "$command\n";
  }

  $output = `$command`;
  if ($debug > 2) {
    print "$output\n";
  }

  @vals = split(" ", $output);

  # grab 4th item from the output, which is the hard drive temperature
  $temp = "$vals[3]\n";
  if( $debug > 1 ) {
    print "$hd_designator$item: $temp";
  }

  # update maximum drive temperature
  $max_temp = $temp if $temp > $max_temp;
}

if( $debug > 0 ) {
  print "Maximum HD Temperature: $max_temp\n";
}

if ($max_temp >= $max_allowed_temp ) {

if( $debug > 0 ) {
    print "drives are too hot, going to 100%\n";
  }

  # set hd fan speed control to 100%
  `ipmitool raw 0x30 0x70 0x66 0x01 1 100`;
}

elsif ($max_temp >= $max_allowed_temp - 1 ) {
  
if( $debug > 0 ) {
    print "drives are warm, going to %75\n";
  }
  
  # set hd fans speed control to 75%
  `ipmitool raw 0x30 0x70 0x66 0x01 1 75`;
}

elsif ($max_temp >= $max_allowed_temp - 2 ) {

  if( $debug > 0 ) {
    print "drives are warming, going to 50%\n";
  }

  # set peripheral zone fan speed to 50% duty cycle
  `ipmitool raw 0x30 0x70 0x66 0x01 1 50`;
}

else {

  if( $debug > 0 ) {
    print "drives are cool enough, going to 25%\n";
  }
  # set to 30%
`ipmitool raw 0x30 0x70 0x66 0x01 1 25`;
}

# reset BMC if temps are cool, and fan is not slow
if ($max_temp < $max_allowed_temp - 3 ){

  sleep 10; #need to wait for fans to change speed
  
  $command = "ipmitool sdr | grep FANA";
  $output = `$command`;
  @vals = split(" ", $output);
  $fan_speed = "$vals[2]";

  if ($fan_speed > $min_fan_speed){
    if( $debug > 0 ) {
      print "drives are cool ($max_temp), but fan is high ($fan_speed). resetting BMC\n";
    }

    `ipmitool bmc reset cold`;
  }
}

# reset BMC if temps are warm, and fan is not fast
if ($max_temp > $max_allowed_temp ){
  sleep 10; # need to wait for fans to change speed...

$command = "ipmitool sdr | grep FANA";
  $output = `$command`;
  @vals = split(" ", $output);
  $fan_speed = "$vals[2]";

  if ($fan_speed < $max_fan_speed){
    if( $debug > 0 ) {
        print "drives are hot ($max_temp), but fan is low ($fan_speed). resetting BMC\n";
    }
    `ipmitool bmc reset cold`;
  }
}

print LOGFILE "$datestring - $max_temp";
close (LOGFILE);

if( $loop_sleep > 0 ) {
  if( $debug > 2 ) {
    print "sleeping...\n";
  }
  sleep $loop_sleep;
}

} while( $loop_sleep )


I've attached the modified perl script. To use this like kevin's original, set debug = 0, and loop_seconds = 0.

Also, you can change the "max_allowed_temp".

You should run it as is in a terminal to verify its working.


PS: I've now written a different Hybrid CPU & HD Fan Controller script
 

Attachments

  • hd_fan_control.pl.zip
    2.7 KB · Views: 414
Last edited:

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
My intention is next to get @Glorius1's PID script working :)

Well, this proved a lot easier than I was expecting. All I needed to do was duplicate the relevant ipmitool control lines and reference region 1 instead of 0, and FANA instead of FAN1 (duplicate so that the original code is still there and usable, but commented out).

I've attached a patch to the 2016-07-02 version of @Glorius1 PID script (fantastic work btw @Glorious1). It's up to him if he wants to use my edits or not. Also I'm not sure about the etiquette around modifying and posting someone else's work on these forums (I come from a Windows world primarily).

A bit about my config:
Due to my system layout (Fractal Design Node 804) which has a clear separation between motherboard and drives, my desire was to only control the fans servicing the HDD bay whilst leaving the BMC to control the CPU/MB bay fans. My testing has proven solid over the last few hours. I have two PWM fans hooked up via a Y-cable to the FANA header which service the HDD bay. I currently only have the CPU fan as a PWM fan connected to FAN1, but it is enough to prove functionality (more PWM fans coming soon).

Using the edited script, I can see that the PID control logic affects the duty cycle on FANA keeping my drive temperatures on an even keel, and the BMC still correctly controls the CPU fan based on CPU temperature (I cranked up 3 transcode streams in Emby to give the CPU a workout).

Regards,

CJ
 

Attachments

  • spinpid.patch.txt
    3.5 KB · Views: 451
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I've attached a patch to the 2016-07-02 version of @Glorius1 PID script (fantastic work btw @Glorious1). It's up to him if he wants to use my edits or not. Also I'm not sure about the etiquette around modifying and posting someone else's work on these forums (I come from a Windows world primarily).
Thanks for your consideration, CJ. I would be happy to add your patch to the PID script in my post, but I'm kind of busy now and will need some time to absorb and understand the information and code you guys have generated. Please give me a few days.

Also, I'm not familiar with patch 'technology'. Is there some software that can automatically apply the patch file to the original file? Not that it is so complex that's needed, just curious.
 

PigLover

Dabbler
Joined
May 29, 2016
Messages
11
@PigLover,

Your article on ServeTheHome, has the wrong zone in the second example.
Good catch. I've edited it and correct the goof.

Also good catch on the decimal percentages. I'm just so used to working in Hex when using ipmi pokes that it never even occurred to me why they might have ranged it that way :)
 

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
Thanks for your consideration, CJ. I would be happy to add your patch to the PID script in my post, but I'm kind of busy now and will need some time to absorb and understand the information and code you guys have generated. Please give me a few days.

Also, I'm not familiar with patch 'technology'. Is there some software that can automatically apply the patch file to the original file? Not that it is so complex that's needed, just curious.

The command is quite simple. Have your original spinpid.txt file in the same directory as the .patch file (remove the .txt extension), then use:

Code:
patch -b < spinpid.patch


The -b will make a backup of your original file. You should get output similar to this:

Code:
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- spinpid.txt    2016-08-16 22:05:34.000000000 +1000
|+++ spinpid-cj.txt    2016-08-16 22:16:29.022212356 +1000
--------------------------
Patching file spinpid.txt using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 45.
Hunk #3 succeeded at 63.
Hunk #4 succeeded at 88.
Hunk #5 succeeded at 97.
Hunk #6 succeeded at 117.
Hunk #7 succeeded at 166.
done


Here's a short article on diff and patching (http://www.thegeekstuff.com/2014/12/patch-command-examples)

Regards,

CJ
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Thanks @Mr Snow. I'm beginning to catch up with what you and @Stux have done. Some interesting and good work.

I'm surprised that when you set mode to OPTIMAL (which, if I understand, means all fans controlled by CPU temperature?), then set the duty cycle for the peripheral/FANA zone, the BMC doesn't countermand your duty cycle. On my board, the BMC will check temperatures periodically and send a command to adjust fans. I get around that by setting mode to FULL. The BMC sets fans on high and then forgets them, so the script can go about its business.

With two zones, I would have thought you would need to at least put the zone you want to control on high, which could be done with HeavyIO mode. But I guess this stuff is pretty idiosyncratic.

As for patching the script - I'll do that soon and see if the script still works for my board, an A1SRi board with only one zone (FAN1-3). Do we know if the patched version works for X9 boards? If different commands are needed, it might be better for you to present the patched one as a separate script version.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
In HeavyIO mode the BMC does countermand the FANA header, in optimal it doesn't seem to. In Standard it doesn't seem to.

I think our versions require the separate zones. Might be worth while adding a switch to enable FANA mode in order to maintain a master script.

edit: I'm wrong about optimal.
 
Last edited:

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
As for patching the script - I'll do that soon and see if the script still works for my board, an A1SRi board with only one zone (FAN1-3). Do we know if the patched version works for X9 boards? If different commands are needed, it might be better for you to present the patched one as a separate script version.

If you only have the 1 zone, then I doubt my edits will work for you. And I've only got the one machine to test it on sorry.

I'm happy to offer it as a separate script. I might do some addtional clean up first (ie/ the logic in your script reports passX instead of adaX for my HDD's. It just needs some regex tweaking). I might even try to add some logic that tests for a region 1 and then make some assumptions about that (ie/ FANA, don't set mode to Full, etc).

Regards,

CJ
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
If you only have the 1 zone, then I doubt my edits will work for you. And I've only got the one machine to test it on sorry.

I'm happy to offer it as a separate script. I might do some addtional clean up first (ie/ the logic in your script reports passX instead of adaX for my HDD's. It just needs some regex tweaking). I might even try to add some logic that tests for a region 1 and then make some assumptions about that (ie/ FANA, don't set mode to Full, etc).

Regards,

CJ

I think it would be neat if we could make a general script which does adapt
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I updated my version of the simple script, to take care of some issues I found in extended testing
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I'm surprised that when you set mode to OPTIMAL (which, if I understand, means all fans controlled by CPU temperature?), then set the duty cycle for the peripheral/FANA zone, the BMC doesn't countermand your duty cycle. On my board, the BMC will check temperatures periodically and send a command to adjust fans. I get around that by setting mode to FULL. The BMC sets fans on high and then forgets them, so the script can go about its business.

With two zones, I would have thought you would need to at least put the zone you want to control on high, which could be done with HeavyIO mode. But I guess this stuff is pretty idiosyncratic.

You're right. Optimal does cause some interference.

Code:
2016-08-17 20:27:31 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)
2016-08-17 20:32:15 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)
2016-08-17 20:35:10 WARNING: Current Duty Cycle (14) does not match last requested Duty Cycle (32)
2016-08-17 20:35:20 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)
2016-08-17 20:38:59 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)
2016-08-17 20:41:21 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)
2016-08-17 20:51:32 WARNING: Current Duty Cycle (18) does not match last requested Duty Cycle (32)


This is from a run 25 minute or so run.

I added some test code, and had the script cycling every 10 seconds. The BMC seems to want to turn down FANA to 24%. Seems to want to do it every few minutes... You might notice that there's a 10 minute gap where it didn't interfere.

Running similar tests with other modes now...
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
You're right. Optimal does cause some interference.
Running similar tests with other modes now...

HeavyIO Mode:
Code:
2016-08-17 21:00:39 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (32)
2016-08-17 21:03:11 WARNING: Current Duty Cycle (3c) does not match last requested Duty Cycle (32)
2016-08-17 21:03:22 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (32)
2016-08-17 21:08:38 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (32)
2016-08-17 21:17:22 WARNING: Current Duty Cycle (3c) does not match last requested Duty Cycle (32)
2016-08-17 21:20:51 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (32)
2016-08-17 21:23:56 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (19)
2016-08-17 21:31:45 WARNING: Current Duty Cycle (5c) does not match last requested Duty Cycle (32)


So the behaviour is the same, except in Optimal mode, the BMC turns down FANA to 24% every few minutes... and an HeavyIO it turns them up to 92% every few minutes.

If I had to pick, I would go with Optimal mode, since the reason I don't just set all the fans to Full is because Noise is a concern, and if the fans are ramping up to 92% every few minutes that could be annoying... although I don't seem to be hearing it from where I am (a few metres away).

Meanwhile, with Optimal mode, every few minutes the fans are reduced to minium when they shouldn't necessarily be... this does not produce noise, and as long as the fan loop was run relatively often, I'm not sure it would be of concern in the long run, since HDs do take a while to heat up.

Will continue to look at the other modes. The problem is I don't want to have to write a fan control loop to control the CPU temperature!!!
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Will continue to look at the other modes. The problem is I don't want to have to write a fan control loop to control the CPU temperature!!!

I've now been running for 15 30 minutes in Standard mode, and it seems to be doing what I want... Ie, the BMC has not interfered with the FANA control script.

At the moment in Standard mode, Zone 0 is simply at 34%. Do not know if it will scale up with CPU temperature.
 

Mr Snow

Dabbler
Joined
May 22, 2016
Messages
29
That is odd behaviour @Stux . I have my fan mode set to Optimal.
Below are my current script output results.

Code:
==> spinpid.log <==
16:47:50  Spin 33 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.43  500 Optimal  35/36      ERRc= -0.14  P= -0.57  I= 0.00  D=  1.14
16:52:51  Spin 33 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.43  500 Optimal  36/35      ERRc= -0.14  P= -0.57  I= 0.00  D=  0.00
16:57:52  Spin 33 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.43  500 Optimal  35/34      ERRc= -0.14  P= -0.57  I= 0.00  D=  0.00
17:02:53  Spin 34 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.57  500 Optimal  34/35      ERRc=  0.00  P=  0.00  I= 0.00  D=  1.14
17:07:54  Spin 34 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.57  500 Optimal  35/35      ERRc=  0.00  P=  0.00  I= 0.00  D=  0.00
17:12:55  Spin 34 Spin 35 Spin 36 Spin 35 Spin 31 Spin 33 Spin 32 ^36  33.71  500 Optimal  35/37      ERRc=  0.14  P=  0.58  I= 0.00  D=  1.14
17:17:56  Spin 34 Spin 35 Spin 36 Spin 35 Spin 31 Spin 33 Spin 32 ^36  33.71  600 Optimal  37/38      ERRc=  0.14  P=  0.58  I= 0.00  D=  0.00
17:22:57  Spin 34 Spin 35 Spin 36 Spin 35 Spin 31 Spin 33 Spin 32 ^36  33.71  600 Optimal  38/39      ERRc=  0.14  P=  0.58  I= 0.00  D=  0.00
17:27:58  Spin 34 Spin 35 Spin 36 Spin 35 Spin 31 Spin 33 Spin 32 ^36  33.71  600 Optimal  39/40      ERRc=  0.14  P=  0.58  I= 0.00  D=  0.00
17:32:59  Spin 34 Spin 35 Spin 35 Spin 35 Spin 31 Spin 33 Spin 32 ^35  33.57  600 Optimal  40/39      ERRc=  0.00  P=  0.00  I= 0.00  D= -1.14

 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Do not know if it will scale up with CPU temperature.

Been running tests in Windows with AIDA64 CPU stress test.

Firstly, if you set the duty cycle of a fan to 20%, it may stall, if it stalls the BMC will ramp everything up. This can cause issues when trying to work out if the BMC is interfering. Use 25% as a minimum ;)

Secondly, in Standard Mode, the BMC likes to set everything to 52%. If you then set both zone to 25%, CPU heat will approach Tcase, and as it does, the BMC will ramp up all fan headers (both zones). It only seems to do this when the CPU temp is increasing.

Thirdly, in Full Mode, the BMC sets everything to 100%. If you then set both zones to 25%, everything will heat up past Tcase... with no interference... I wasn't game to let it go much past Tcase before I cranked the fans back up.

Thus, as has been said many times, if you don't want interference, then use Full mode.

Now, I'm working out what %ge Zone 0 needs to be at under full CPU/memory load with the HD fans at 25%.

My new revised plan is to hard code that for Zone 0, and let Zone 1 be controlled by the PID controllers.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
That is odd behaviour @Stux . I have my fan mode set to Optimal.

Can't get to it right now, because I've got it under test in Windows...

but at the bottom of the loop, just after setting the duty cycle, I get the current zone duty cycle using

ipmitool raw 0x30 0x70 0x66 0x00 1

and store that as last_duty

and then at the top of the loop, after the sleep, I get the current duty cycle again... current_duty.

if last_duty && last_duty != current_duty, then the duty cycle was changed from underneath the script... which generates the warning.

I can now confirm that heavyio, standard and optimal all do definately interfere. at least on an x10sri-f
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I think I've worked out why I'm seeing Optimal changing FANA. Its because it sets FANA to a stalling speed. FANA stalls, it then surges up...

Your fans are probably not stalling in Optimal.

edit: I've been leaving the system in CPU burn mode, in Optimal, FANA fans are surging as optimal dials the fans to 20%, which is a stalling speed for my fans :(
 
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I might do some addtional clean up first (ie/ the logic in your script reports passX instead of adaX for my HDD's. It just needs some regex tweaking).
The output of camcontrol devlist seems to change the order of passX and adaX for every OS version. I've had to change that back and forth several times to keep up. Now it's correct for my adaX drives but not for my daX drives (on a M1015 adapter). I'll fix that . . . again. Here's my current output, very annoying:
Code:
[jim@Tabernacle ~]$ sudo camcontrol devlist
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 0 lun 0 (pass0,da0)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 1 lun 0 (pass1,da1)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 2 lun 0 (pass2,da2)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 3 lun 0 (pass3,da3)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus1 target 0 lun 0 (ada0,pass4)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus5 target 0 lun 0 (ada1,pass5)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus6 target 0 lun 0 (ada2,pass6)
. . .


I might even try to add some logic that tests for a region 1 and then make some assumptions about that (ie/ FANA, don't set mode to Full, etc).
Maybe the easiest way to have a unified script is to add a zone or region setting. ZONE=0 if you have only one zone, like me, and ZONE=1 if there are two zones. Then, when issuing the ipmitool raw command, use $ZONE variable in that place. Would that work?
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
The output of camcontrol devlist seems to change the order of passX and adaX for every OS version. I've had to change that back and forth several times to keep up. Now it's correct for my adaX drives but not for my daX drives (on a M1015 adapter). I'll fix that . . . again. Here's my current output, very annoying:
Code:
[jim@Tabernacle ~]$ sudo camcontrol devlist
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 0 lun 0 (pass0,da0)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 1 lun 0 (pass1,da1)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 2 lun 0 (pass2,da2)
<ATA WDC WD30EZRX-00S 0A80>        at scbus0 target 3 lun 0 (pass3,da3)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus1 target 0 lun 0 (ada0,pass4)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus5 target 0 lun 0 (ada1,pass5)
<WDC WD30EFRX-68EUZN0 82.00A82>    at scbus6 target 0 lun 0 (ada2,pass6)
. . .



Maybe the easiest way to have a unified script is to add a zone or region setting. ZONE=0 if you have only one zone, like me, and ZONE=1 if there are two zones. Then, when issuing the ipmitool raw command, use $ZONE variable in that place. Would that work?

I'm looking at adding a CPU temp control loop.

There would be the one or two zones, but also if the HD zone is independent of the CPU zone, or if you want to increase the HD zone when you increase the CPU zone in response to escalating CPU temps.

My idea is basically to work out the CPU and HD zone duty cycles, and if the CPU zone is greater than HD zones duty cycle AND they aren't independent, then set both zones to the CPU duty cycle, else their own.

By independent, I'm referring to cases where the HDs are in a separate compartment which does not share airflow with the CPU compartment
 
Top