This is a very interesting project! Congrats for getting it working. It really merits its own thread, as I expect there will be a fair bit of interest, and it can get confusing when threads contain discussions on more than one disparate subject.I finally found that there's a product range from Corsair which subscribes to the concept of CorsairLink, which has been (at least partially) reverse engineered by the linux community to a project called OpenCorsairLink, which I had seen somebody had ported to MacOS... finally, something to give me some hope. I rushed out and ordered the Commander Pro (one of the products in that range), which has 4 temperature sensors, 6 PWM fan ports, a USB connection to the MoBo (and a hub in case you still need the header for other connections), plus some controls for LED lighting (in case you're one of "those people").
This really is great work. I wish I had read the details when this first happened. Do you have the source code available for download?Happy to share any details or answer questions on what I did if it's interesting. (I guess it means this script can be adapted for use in almost any system provided you can buy one of the corsair devices)
Great sense of humor.plus some controls for LED lighting (in case you're one of "those people").
I have the source (and obviously the compiled executable for 3 and 4 pin fans... I never did work out how to deal with a variable type conversion needed to set that at the command line), but since the project is GPL, I'm technically required to publish it to the project, which I'm sadly lacking the confidence/knowledge on how to do properly without messing up anyone else's additions.Do you have the source code available for download?
It probably needs to be a fork because you said the original was for Linux and this is probably going to be more specific to BSD and possibly even specific to FreeNAS to some degree.but since the project is GPL, I'm technically required to publish it to the project, which I'm sadly lacking the confidence/knowledge on how to do properly without messing up anyone else's additions.
Yes, @Stux's mod in post #102 is the latest version of this script of which I am aware. But, both @Stux and I have since moved on to newer fan control scripts. I have updated the original post of this thread to point to those scripts.whats the most recent version of the original script? is it still the "2.1 stux"
I need to rewrite mine and I would greatly appreciate the most recent without searching 13 pages.
# ipmitool sdr CPU Temp | 34 degrees C | ok PCH Temp | 24 degrees C | ok System Temp | 28 degrees C | ok Peripheral Temp | 26 degrees C | ok VcpuVRM Temp | 32 degrees C | ok DIMMA1 Temp | 24 degrees C | ok DIMMA2 Temp | 23 degrees C | ok DIMMB1 Temp | 22 degrees C | ok DIMMB2 Temp | 22 degrees C | ok FAN1 | 2000 RPM | ok FAN2 | 1200 RPM | ok FAN3 | 1400 RPM | ok FAN4 | 2800 RPM | nr FANA | 2800 RPM | nr 12V | 12.19 Volts | ok 5VCC | 4.92 Volts | ok 3.3VCC | 3.35 Volts | ok VBAT | 3.14 Volts | ok Vcpu | 1.26 Volts | ok VDIMMAB | 1.19 Volts | ok 5VSB | 5.03 Volts | ok 3.3VSB | 3.27 Volts | ok VPCH 1.5V | 1.04 Volts | ok Chassis Intru | 0x00 | ok
# ipmitool sensor list al CPU Temp | 35.000 | degrees C | ok | 0.000 | 0.000 | 0.000 | 95.000 | 100.000 | 100.000 PCH Temp | 24.000 | degrees C | ok | -11.000 | -8.000 | -5.000 | 90.000 | 95.000 | 100.000 System Temp | 28.000 | degrees C | ok | -9.000 | -7.000 | -5.000 | 80.000 | 85.000 | 90.000 Peripheral Temp | 26.000 | degrees C | ok | -9.000 | -7.000 | -5.000 | 80.000 | 85.000 | 90.000 VcpuVRM Temp | 31.000 | degrees C | ok | -9.000 | -7.000 | -5.000 | 95.000 | 100.000 | 105.000 DIMMA1 Temp | 24.000 | degrees C | ok | 1.000 | 2.000 | 4.000 | 80.000 | 85.000 | 90.000 DIMMA2 Temp | 23.000 | degrees C | ok | 1.000 | 2.000 | 4.000 | 80.000 | 85.000 | 90.000 DIMMB1 Temp | 22.000 | degrees C | ok | 1.000 | 2.000 | 4.000 | 80.000 | 85.000 | 90.000 DIMMB2 Temp | 22.000 | degrees C | ok | 1.000 | 2.000 | 4.000 | 80.000 | 85.000 | 90.000 FAN1 | 2000.000 | RPM | ok | 300.000 | 500.000 | 700.000 | 2600.000 | 2800.000 | 3000.000 FAN2 | 1200.000 | RPM | ok | 100.000 | 200.000 | 300.000 | 2500.000 | 2200.000 | 2000.000 FAN3 | 1400.000 | RPM | ok | 100.000 | 200.000 | 300.000 | 2500.000 | 2200.000 | 2000.000 FAN4 | 2800.000 | RPM | nr | 100.000 | 200.000 | 300.000 | 2500.000 | 2200.000 | 2000.000 FANA | 2800.000 | RPM | nr | 100.000 | 200.000 | 300.000 | 2500.000 | 2200.000 | 2000.000 12V | 12.192 | Volts | ok | 10.144 | 10.272 | 10.784 | 12.960 | 13.280 | 13.408 5VCC | 4.896 | Volts | ok | 4.246 | 4.298 | 4.480 | 5.390 | 5.546 | 5.598 3.3VCC | 3.350 | Volts | ok | 2.789 | 2.823 | 2.959 | 3.554 | 3.656 | 3.690 VBAT | 3.140 | Volts | ok | 2.384 | 2.496 | 2.580 | 3.476 | 3.588 | 3.672 Vcpu | 1.282 | Volts | ok | 0.085 | 0.085 | 0.085 | 1.588 | 1.750 | 1.768 VDIMMAB | 1.191 | Volts | ok | 0.948 | 0.975 | 1.047 | 1.344 | 1.425 | 1.443 5VSB | 5.026 | Volts | ok | 4.246 | 4.376 | 4.480 | 5.390 | 5.546 | 5.598 3.3VSB | 3.265 | Volts | ok | 2.755 | 2.840 | 2.908 | 3.503 | 3.605 | 3.639 VPCH 1.5V | 1.041 | Volts | ok | 0.825 | 0.852 | 0.915 | 1.176 | 1.239 | 1.266 Chassis Intru | 0x0 | discrete | 0x0000| na | na | na | na | na | na
ipmitool raw 0x30 0x70 0x66 0x01 0x01 0x16
FAN4 | 3000 RPM | nr
FAN4 | 1500 RPM | ok
Perhaps this is due to thresholds. It was for me. I also changed $hd_fan_duty_low in the config file. Using Kevin's script.Eventually BMC takes over and fans are reset to 2800RPM.
Then the cycle repeats.
2020-02-12 11:13:58: temperature error = -10 2020-02-12 11:13:58: PID corrections are P = -80, I = 0 and D = 0 2020-02-12 11:13:58: PID control new duty cycle is 30% 2020-02-12 11:13:58: Setting Zone 0 duty cycle to 30% 2020-02-12 11:14:09: core_temps: 30.0 30.0 25.0 25.0 32.0 32.0 29.0 29.0 2020-02-12 11:14:09: core_temp = 30.0 C 2020-02-12 11:14:09: core_temp = 30.0 C 2020-02-12 11:14:09: core_temp = 25.0 C 2020-02-12 11:14:09: core_temp = 25.0 C 2020-02-12 11:14:09: core_temp = 32.0 C 2020-02-12 11:14:09: core_temp = 32.0 C 2020-02-12 11:14:09: core_temp = 29.0 C 2020-02-12 11:14:09: core_temp = 29.0 C 2020-02-12 11:14:09: CPU Temp: 32.0 2020-02-12 11:14:09: fan_speed = 2000 2020-02-12 11:14:09: CPU Fan speed: 2000 RPM 2020-02-12 11:14:10: fan_speed = 1200 2020-02-12 11:14:10: HD Fan speed: 1200 RPM 2020-02-12 11:14:10: CPU fan speed should be low, but 2000 > 1440. 2020-02-12 11:14:10: bmc_fail_count: 1, bmc_fail_threshold: 1 2020-02-12 11:14:10: Fan speeds are not where they should be, will try again. 2020-02-12 11:14:10: fanmode: full = 1
2020-02-12 11:07:28: CPU Fan: low 2020-02-12 11:07:28: fan_speed = 2000 2020-02-12 11:07:28: CPU Fan speed: 2000 RPM 2020-02-12 11:07:29: fan_speed = 1200 2020-02-12 11:07:29: HD Fan speed: 1200 RPM 2020-02-12 11:07:29: CPU fan speed should be low, but 2000 > 1440. 2020-02-12 11:07:29: bmc_fail_count: 2, bmc_fail_threshold: 1 2020-02-12 11:07:29: Fan speeds are still not where they should be after 2 attempts, will reboot BMC. 2020-02-12 11:07:29: fanmode: full = 1 2020-02-12 11:07:29: Setting fan mode to 1 (full)
FAN1 | 1200.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2600.000 | 2800.000 | 3000.000 FAN2 | 2800.000 | RPM | nr | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FAN3 | 1500.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FAN4 | 1500.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FANA | 2000.000 | RPM | ok | 300.000 | 700.000 | 900.000 | 2600.000 | 2800.000 | 3000.000
####################### ## FAN CONFIGURATION #################### ## FAN SPEEDS ## You need to determine the actual max fan speeds that are achieved by the fans ## Connected to the cpu_fan_header and the hd_fan_header. ## These values are used to verify high/low fan speeds and trigger a BMC reset if necessary. $cpu_max_fan_speed = 1800; $hd_max_fan_speed = 3300; ## CPU FAN DUTY LEVELS ## These levels are used to control the CPU fans $fan_duty_high = 100; # percentage on, ie 100% is full speed. $fan_duty_med = 60; $fan_duty_low = 30; ## HD FAN DUTY LEVELS ## These levels are used to control the HD fans $hd_fan_duty_high = 100; # percentage on, ie 100% is full speed. $hd_fan_duty_med_high = 80; $hd_fan_duty_med_low = 50; $hd_fan_duty_low = 30; # some 120mm fans stall below 30. ## FAN ZONES # Your CPU/case fans should probably be connected to the main fan sockets, which are in fan zone zero # Your HD fans should be connected to FANA which is in Zone 1 # You could switch the CPU/HD fans around, as long as you change the zones and fan header configurations. # # 0 = FAN1..5 # 1 = FANA..FANC $cpu_fan_zone = 1; $hd_fan_zone = 0; ## FAN HEADERS ## these are the fan headers which are used to verify the fan zone is high. FAN1+ are all in Zone 0, FANA is Zone 1. ## cpu_fan_header should be in the cpu_fan_zone ## hd_fan_header should be in the hd_fan_zone $cpu_fan_header = "FANA"; # used for printing to standard output for debugging $hd_fan_header = "FAN1"; # used for printing to standard output for debugging @hd_fan_list = ("FAN2", "FAN3", "FAN4"); # used for logging to file
Post this issue over in the PID thread, since your using Kevin's script. https://www.ixsystems.com/community/threads/pid-fan-controller-perl-script.50908/Maybe this isn't for me.
I changed so the CPU is on header FANA and the others are on FAN1-4. The problematic fan combo (loud) sits on FAN4/FAN2
The script does adjustments but immediately the BMC reverts:
Code:2020-02-12 11:13:58: temperature error = -10 2020-02-12 11:13:58: PID corrections are P = -80, I = 0 and D = 0 2020-02-12 11:13:58: PID control new duty cycle is 30% 2020-02-12 11:13:58: Setting Zone 0 duty cycle to 30% 2020-02-12 11:14:09: core_temps: 30.0 30.0 25.0 25.0 32.0 32.0 29.0 29.0 2020-02-12 11:14:09: core_temp = 30.0 C 2020-02-12 11:14:09: core_temp = 30.0 C 2020-02-12 11:14:09: core_temp = 25.0 C 2020-02-12 11:14:09: core_temp = 25.0 C 2020-02-12 11:14:09: core_temp = 32.0 C 2020-02-12 11:14:09: core_temp = 32.0 C 2020-02-12 11:14:09: core_temp = 29.0 C 2020-02-12 11:14:09: core_temp = 29.0 C 2020-02-12 11:14:09: CPU Temp: 32.0 2020-02-12 11:14:09: fan_speed = 2000 2020-02-12 11:14:09: CPU Fan speed: 2000 RPM 2020-02-12 11:14:10: fan_speed = 1200 2020-02-12 11:14:10: HD Fan speed: 1200 RPM 2020-02-12 11:14:10: CPU fan speed should be low, but 2000 > 1440. 2020-02-12 11:14:10: bmc_fail_count: 1, bmc_fail_threshold: 1 2020-02-12 11:14:10: Fan speeds are not where they should be, will try again. 2020-02-12 11:14:10: fanmode: full = 1
I repeatedly get the script resetting the BMC with messages like:
Code:2020-02-12 11:07:28: CPU Fan: low 2020-02-12 11:07:28: fan_speed = 2000 2020-02-12 11:07:28: CPU Fan speed: 2000 RPM 2020-02-12 11:07:29: fan_speed = 1200 2020-02-12 11:07:29: HD Fan speed: 1200 RPM 2020-02-12 11:07:29: CPU fan speed should be low, but 2000 > 1440. 2020-02-12 11:07:29: bmc_fail_count: 2, bmc_fail_threshold: 1 2020-02-12 11:07:29: Fan speeds are still not where they should be after 2 attempts, will reboot BMC. 2020-02-12 11:07:29: fanmode: full = 1 2020-02-12 11:07:29: Setting fan mode to 1 (full)
It then goes on to reboot BMC which it does every so every 2-3 minutes. When BMC kicks back on I get:
FAN1 | 1200 RPM | ok
FAN2 | 2800 RPM | nr
FAN3 | 1500 RPM | ok
FAN4 | 1500 RPM | ok
FANA | 2000 RPM | nr
Thresholds are
Code:FAN1 | 1200.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2600.000 | 2800.000 | 3000.000 FAN2 | 2800.000 | RPM | nr | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FAN3 | 1500.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FAN4 | 1500.000 | RPM | ok | 300.000 | 400.000 | 500.000 | 2500.000 | 2200.000 | 2000.000 FANA | 2000.000 | RPM | ok | 300.000 | 700.000 | 900.000 | 2600.000 | 2800.000 | 3000.000
Kevin's script has following set:
Code:####################### ## FAN CONFIGURATION #################### ## FAN SPEEDS ## You need to determine the actual max fan speeds that are achieved by the fans ## Connected to the cpu_fan_header and the hd_fan_header. ## These values are used to verify high/low fan speeds and trigger a BMC reset if necessary. $cpu_max_fan_speed = 1800; $hd_max_fan_speed = 3300; ## CPU FAN DUTY LEVELS ## These levels are used to control the CPU fans $fan_duty_high = 100; # percentage on, ie 100% is full speed. $fan_duty_med = 60; $fan_duty_low = 30; ## HD FAN DUTY LEVELS ## These levels are used to control the HD fans $hd_fan_duty_high = 100; # percentage on, ie 100% is full speed. $hd_fan_duty_med_high = 80; $hd_fan_duty_med_low = 50; $hd_fan_duty_low = 30; # some 120mm fans stall below 30. ## FAN ZONES # Your CPU/case fans should probably be connected to the main fan sockets, which are in fan zone zero # Your HD fans should be connected to FANA which is in Zone 1 # You could switch the CPU/HD fans around, as long as you change the zones and fan header configurations. # # 0 = FAN1..5 # 1 = FANA..FANC $cpu_fan_zone = 1; $hd_fan_zone = 0; ## FAN HEADERS ## these are the fan headers which are used to verify the fan zone is high. FAN1+ are all in Zone 0, FANA is Zone 1. ## cpu_fan_header should be in the cpu_fan_zone ## hd_fan_header should be in the hd_fan_zone $cpu_fan_header = "FANA"; # used for printing to standard output for debugging $hd_fan_header = "FAN1"; # used for printing to standard output for debugging @hd_fan_list = ("FAN2", "FAN3", "FAN4"); # used for logging to file
Hey thanks for help --Did you set your thresholds?
Post this issue over in the PID thread, since your using Kevin's script. https://www.ixsystems.com/community/threads/pid-fan-controller-perl-script.50908/