Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Script: Hybrid CPU & HD Fan Zone Controller

GolDenis

Member
Joined
Oct 25, 2019
Messages
38
2019-12-20 11:02:12: Drives are cool enough, going to 30%
2019-12-20 11:02:23: HD fan speed should be low, but 1400 > 1200.
2019-12-20 11:02:41: HD fan speed should be low, but 1500 > 1200.
2019-12-20 11:02:46: Resetting BMC
2019-12-20 11:02:58: HD fan speed should be low, but 1400 > 1200.
2019-12-20 11:03:15: HD fan speed should be low, but 1500 > 1200.
2019-12-20 11:03:20: Resetting BMC
Means that something wrong with my fan?
why it's unmanaged?
 

Kevin Horton

Neophyte Sage
Joined
Dec 2, 2015
Messages
675
2019-12-20 11:02:12: Drives are cool enough, going to 30%
2019-12-20 11:02:23: HD fan speed should be low, but 1400 > 1200.
2019-12-20 11:02:41: HD fan speed should be low, but 1500 > 1200.
2019-12-20 11:02:46: Resetting BMC
2019-12-20 11:02:58: HD fan speed should be low, but 1400 > 1200.
2019-12-20 11:03:15: HD fan speed should be low, but 1500 > 1200.
2019-12-20 11:03:20: Resetting BMC
Means that something wrong with my fan?
why it's unmanaged?
What are your BMC fan speed thresholds? Show us the output of ipmitool sensor | grep FAN
 

GolDenis

Member
Joined
Oct 25, 2019
Messages
38
root@freenas[~]# ipmitool sensor | grep FAN
FAN1 | 2300.000 | RPM | cr | 400.000 | 500.000 | 700.000 | 1200.000 | 1500.000 | 2400.000
FAN2 | 4300.000 | RPM | nr | 300.000 | 400.000 | 500.000 | 2200.000 | 2400.000 | 2600.000
FAN3 | 1200.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2000.000 | 2100.000 | 2300.000
FAN4 | na | | na | na | na | na | na | na | na
FANA | 1400.000 | RPM | cr | 500.000 | 600.000 | 700.000 | 1200.000 | 1400.000 | 1600.000

FAN1 - water cooling pump fan (pwm) (2300rpm max)
FAN2 - it's water cooling pump (no pwm)
FAN3 - 1500 rpm max (pwm)
FANA - 1500 rpm max (pwm)
 

Kevin Horton

Neophyte Sage
Joined
Dec 2, 2015
Messages
675
root@freenas[~]# ipmitool sensor | grep FAN
FAN1 | 2300.000 | RPM | cr | 400.000 | 500.000 | 700.000 | 1200.000 | 1500.000 | 2400.000
FAN2 | 4300.000 | RPM | nr | 300.000 | 400.000 | 500.000 | 2200.000 | 2400.000 | 2600.000
FAN3 | 1200.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2000.000 | 2100.000 | 2300.000
FAN4 | na | | na | na | na | na | na | na | na
FANA | 1400.000 | RPM | cr | 500.000 | 600.000 | 700.000 | 1200.000 | 1400.000 | 1600.000

FAN1 - water cooling pump fan (pwm) (2300rpm max)
FAN2 - it's water cooling pump (no pwm)
FAN3 - 1500 rpm max (pwm)
FANA - 1500 rpm max (pwm)
Is FANA the HD fan? If so, I wonder if perhaps it sometimes runs fast enough to trip the 1600 rpm upper limit in the fan thresholds. if FANA is the HD fan, it might be worth increasing its upper thresholds a bit.
 

GolDenis

Member
Joined
Oct 25, 2019
Messages
38
Is FANA the HD fan? If so, I wonder if perhaps it sometimes runs fast enough to trip the 1600 rpm upper limit in the fan thresholds. if FANA is the HD fan, it might be worth increasing its upper thresholds a bit.
Yeap... All 4 HD fans connected to the FANA via splitter.
Strange thing, that I cant see that MB try to spin down the fans at all.
& switch to the Optimal mode doesnt help
1576915522751.png

looks strange for me.
 

GolDenis

Member
Joined
Oct 25, 2019
Messages
38
hm.... my idea - that something wrong with water pump connection
Its extremely high rpm & that's not PWM so.... its just rush with 12v power & show 4300 rpm to the MB
& of cause its unmanaged.
Any ideas? Switch it somewhere to any port without rpm feedback? (Just feed it with 12v only)
Is someone had the same experience with a similar problem? (Don't want to shut down NAS & doing useless monkey job)
 

GolDenis

Member
Joined
Oct 25, 2019
Messages
38
looks after thresholds tunning everything is stabilized.
Need to change CPU water system fan, cause too noisy.

[screen is terminating]
root@freenas[~]# ipmitool sensor | grep FAN
FAN1 | 2300.000 | RPM | nc | 400.000 | 500.000 | 700.000 | 2300.000 | 2500.000 | 2600.000
FAN2 | 4300.000 | RPM | nc | 300.000 | 400.000 | 500.000 | 4300.000 | 4500.000 | 4600.000
FAN3 | 1200.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 1500.000 | 2300.000 | 2500.000
FAN4 | na | | na | na | na | na | na | na | na
FANA | 1400.000 | RPM | ok | 500.000 | 600.000 | 700.000 | 1600.000 | 2300.000 | 2500.000


Code:
2019-12-21 15:07:26: CPU Temp: 36.0 <= 39, CPU Fan going low.
2019-12-21 15:07:26: Maximum HD Temperature: 38
2019-12-21 15:07:26: Drives are warming, going to 50%
2019-12-21 15:10:27: Maximum HD Temperature: 38
2019-12-21 15:13:29: Maximum HD Temperature: 38
2019-12-21 15:16:29: Maximum HD Temperature: 38
2019-12-21 15:19:30: Maximum HD Temperature: 38
2019-12-21 15:22:32: Maximum HD Temperature: 38
2019-12-21 15:25:33: Maximum HD Temperature: 38
2019-12-21 15:28:34: Maximum HD Temperature: 38
2019-12-21 15:31:35: Maximum HD Temperature: 38
2019-12-21 15:34:36: Maximum HD Temperature: 38
2019-12-21 15:37:36: Maximum HD Temperature: 38
2019-12-21 15:40:37: Maximum HD Temperature: 38
2019-12-21 15:43:38: Maximum HD Temperature: 38
2019-12-21 15:46:39: Maximum HD Temperature: 38
2019-12-21 15:49:40: Maximum HD Temperature: 38
2019-12-21 15:52:42: Maximum HD Temperature: 38
2019-12-21 15:55:42: Maximum HD Temperature: 38
2019-12-21 15:58:43: Maximum HD Temperature: 38
2019-12-21 16:01:44: Maximum HD Temperature: 38
2019-12-21 16:04:45: Maximum HD Temperature: 38
2019-12-21 16:07:46: Maximum HD Temperature: 38
2019-12-21 16:10:47: Maximum HD Temperature: 38
2019-12-21 16:13:48: Maximum HD Temperature: 38
2019-12-21 16:16:50: Maximum HD Temperature: 38
2019-12-21 16:19:50: Maximum HD Temperature: 38
2019-12-21 16:22:51: Maximum HD Temperature: 38
2019-12-21 16:25:52: Maximum HD Temperature: 38
2019-12-21 16:28:53: Maximum HD Temperature: 38
2019-12-21 16:31:54: Maximum HD Temperature: 38
2019-12-21 16:34:55: Maximum HD Temperature: 38
2019-12-21 16:37:57: Maximum HD Temperature: 38
2019-12-21 16:40:58: Maximum HD Temperature: 38
2019-12-21 16:43:59: Maximum HD Temperature: 38
2019-12-21 16:47:01: Maximum HD Temperature: 38
2019-12-21 16:50:01: Maximum HD Temperature: 38
2019-12-21 16:53:03: Maximum HD Temperature: 38
2019-12-21 16:56:04: Maximum HD Temperature: 38
2019-12-21 16:59:04: Maximum HD Temperature: 38
2019-12-21 17:02:05: Maximum HD Temperature: 38
2019-12-21 17:05:07: Maximum HD Temperature: 38
2019-12-21 17:08:07: Maximum HD Temperature: 38
2019-12-21 17:11:08: Maximum HD Temperature: 38
2019-12-21 17:14:09: Maximum HD Temperature: 38
2019-12-21 17:17:10: Maximum HD Temperature: 38
2019-12-21 17:20:11: Maximum HD Temperature: 38
2019-12-21 17:23:12: Maximum HD Temperature: 38
 

Gilgameshxg

Member
Joined
Nov 26, 2018
Messages
26
Hello! So I got the script from https://jro.io/nas/ which in the script references it come from this thread which references this one come from Kevin which kevin's was based on Stux's if I have that right. Is this one the newest version of the script? I keep getting the error below and wondering what I'm doing wrong. I nano'ed into a new file pasted a few times and chmod +x the file and I tried with nano -w "script name" but still the same thing. I'm pretty new to this and any help would be super awsome!

syntax error at ./fanctrl.pl line 74, near "the last period"
BEGIN not safe after errors--compilation aborted at ./fanctrl.pl line 76.

Which is at the below part of the script

## this prevents the HD fans from spinning up when the CPU fans are capable of providing
## sufficient cooling.
$cpu_hd_override_temp = 62;
 

sretalla

Dedicated Sage
Joined
Jan 1, 2016
Messages
2,469

Kevin Horton

Neophyte Sage
Joined
Dec 2, 2015
Messages
675
@Stux - A user of my PID variation of your script reported that the CPU fan control did not work as described in the comments in the CPU THRESHOLD TEMPS section. Specifically, the comment on line 62 states that the CPU fan will go to Medium if the temperature drops below this value. I.e. there will be temperature hysteresis in the control loop that switches the CPU fan between Medium and High. The user reports that his CPU fan cycles quickly between Medium and High, and back to Medium again, as the CPU temperature moves above or below the value in $high_cpu_temp. Looking at the code, I see that it matches the behavior he reports.

Question - is that the way you intended it to work, and it is the comment on line 62 that is wrong? Or, did you intended to have CPU temperature hysteresis on the switching between High and Med, and the actual code failed to implement it?

From a system design perspective, it seems logical that we would want some temperature hysteresis in that control loop. I haven't run into this problem myself as my CPU rarely gets to the high temp threshold.
 
Top