Script to control fan speed in response to hard drive temperatures

thepixelgeek

Patron
Joined
Jan 21, 2016
Messages
271
Did I set my thresholds -- arent they set up above? It's strange because the Noctura fan on Fan2 runs above the threshold -- likely contributing to all the noise.
I don't know, but you use ipmi tool to set the low critical threshold.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Sorry to answer your question directly -- that's what I did.

It was a command like this:
Code:
ipmitool sensor thresh FAN2 lower 750 850 950


The tool rounded to 800, 900, 1000 which is OK since apparently it cant do 50 values

Code:
FAN1             | 1200.000   | RPM        | ok    | 300.000   | 400.000   | 500.000   | 2600.000  | 2800.000  | 3000.000
FAN2             | 2800.000   | RPM        | cr    | 800.000   | 900.000   | 1000.000  | 2600.000  | 2800.000  | 3000.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


However even if I set the high threhold down to 1800,1900,2000, the FAN2 header will still run at 2800PRM.
If I manually try change zone 0 to 50% - the changes will be present for less than a second (you can hear the fans spin down) then immediately spin back up to the prior value. I have no idea if its my fans, the BMC, however something isn't working.

Here is the above out with changed upper thresholds on FAN2 header and a reboot of the BMC
Code:
FAN1             | 1200.000   | RPM        | ok    | 300.000   | 400.000   | 500.000   | 2600.000  | 2800.000  | 3000.000 
FAN2             | 2800.000   | RPM        | nr    | 800.000   | 900.000   | 1000.000  | 1800.000  | 1900.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 
12V              | 12.192     | Volts      | ok    | 10.144    | 10.272    | 10.784    | 12.960    | 13.280    | 13.408 
 
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,210
Hey thanks for help --

Did I set my thresholds -- arent they set up above? It's strange because the Noctura fan on Fan2 runs above the threshold -- likely contributing to all the noise.
Well they are set up, but they are set up wrong. The thresholds should increase across the six fields, but your FAN2, FAN3, FAN4, have a lower final value (upper non-recoverable) than the previous value (upper critical). The values should also be below/above what your fans should reach, which they are not.

Also, you said your CPU fan was on FAN1, and FAN2-FAN4 and FANA were all peripheral. You should put the CPU fan on FANA, and set the script accordingly.
 

coolnodje

Explorer
Joined
Jan 29, 2016
Messages
66
I need to have something similar for an ASRock C2550D4I motherboard.
I suppose I could relatively adapt the script by modifying the ipmitool command to fit my motherboard.

I also need to get rid of the CPU Fan part as mine is fan-less, but this should also be ok.

What I'm worried about is finding the right hex numbers for the ipmitool raw commands.
I haven't found a documentation on the constructor site.

I'm wondering how one generally finds out this kind of information.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,210
Please search this thread and other fan control threads for ASRock. There are more differences in fan control between Supermicro and ASrock than just the codes. Finding the codes is the hard part. As I recall we or someone got some codes for asrock but not all.

With just one fan zone, you would use spinpid.sh instead of spinpid2.sh.

EDIT: sorry, thought this was in the thread with my scripts. Anyway, this is the most I have found on ASRock codes:
 
Last edited:

jonnyka

Cadet
Joined
May 11, 2021
Messages
2
Hey guys

I have a DS220J, which has these handy little settings for fans: Low-power mode, Quite mode, etc.

What I'd like to do is to:
- automatically switch between those in certain times (Quite by default, Low-power from 00:00 to 08:00)
- a very quick way to manually switch between them, for example a shortcut on the desktop of the webUI, or a separate webUI with 2 buttons that are triggering the switch

Are these possible? Maybe with https://github.com/khorton/nas_fan_control? If so, can you please give me some basic guidance on how to start?

Thanks!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
I have a DS220J
Are you running TrueNAS on that or the native Synology DSM?

If you're running DSM, those scripts aren't likely to be useful. (nor most of the information in these forums... you should probably head over to the Synology forums to get better help for your setup)
 

jonnyka

Cadet
Joined
May 11, 2021
Messages
2
Are you running TrueNAS on that or the native Synology DSM?

If you're running DSM, those scripts aren't likely to be useful. (nor most of the information in these forums... you should probably head over to the Synology forums to get better help for your setup)
native, I'll check out TrueNAS, thank you!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Just to be clear, I was in no way confirming that your hardware is suitable for running TrueNAS (it probably isn't).
 
Joined
Dec 2, 2015
Messages
730
Hey guys

I have a DS220J, which has these handy little settings for fans: Low-power mode, Quite mode, etc.

What I'd like to do is to:
- automatically switch between those in certain times (Quite by default, Low-power from 00:00 to 08:00)
- a very quick way to manually switch between them, for example a shortcut on the desktop of the webUI, or a separate webUI with 2 buttons that are triggering the switch

Are these possible? Maybe with https://github.com/khorton/nas_fan_control? If so, can you please give me some basic guidance on how to start?

Thanks!
What you want is only possible if certain conditions exist:
  1. The operating system that runs your NAS provides a way for you to run a program or command line script at some regular interval.
  2. The program or command line script that you run can determine the temperatures of the hard drives.
  3. The program or command line script that you run can control the fan speed.
  4. You have or can acquire the expertise to write this program or command line script.
The folks on this forum use and know TrueNAS (new name for FreeNAS). We know very little about Synology, so you will probably find more info and assistance on a forum that specializes in the Synology NAS.

Good luck
 
Top