[how to] fan speed override and fine tuning (v2)

Moderator: Lillian.W@AST

dergilb
Posts: 10
youtube meble na wymiar Warszawa
Joined: Sat Aug 19, 2017 8:15 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by dergilb »

ok set to zero stops the fan. but the nas shows an error in log and gives a buzzer signal, any ideas how to adjust that?
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by sksbir »

dergilb wrote:ok set to zero stops the fan. but the nas shows an error in log and gives a buzzer signal, any ideas how to adjust that?
no. I'm afraid that the program which initially control fan speed is the same which starts an alarm.
imho fan should not be stopped.

Out of that, scripts are now working on AS5102T and AS3102T with ADM v3, and transition to ADM V3 was flawless : I just had nothing to do regarding scripts.
ca6
Posts: 18
Joined: Mon Sep 03, 2018 6:26 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by ca6 »

I was in contact with tech support yesterday regarding my HDD temps and the fan running at 'low'' speed in Auto-mode on my AS6404T, and they told me that they're aiming at adding configurable fan speeds in upcoming version of ADM.

I have a room temp of roughly 22C and my HDDs are running at around 50C, fan at 540rpm. (My WD Reds have operational temps listed up to 65C so I guess it's not a huge problem, but I'd like them to stay at 45C or something.)

I'm curious about trying your script, but I wouldn't be sure how to reverse/remove the script if I'm not happy with it :/
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by sksbir »

script don't change anything in configuration. Just kill the script and fan will revert to speed choosed from ADM interface in less than 10s.
remove files and it's ok.
noebr
Posts: 18
Joined: Thu Feb 01, 2018 12:33 am
Location: Brazil

Re: [how to] fan speed override and fine tuning (v2)

Post by noebr »

sksbir wrote:
MikeG.6.5 wrote:Went to test this and got a slew of errors. Line 6, then a bunch of line 42's and then a whole bunch of 106's... ....
Hi Mike. I think you were too tired , and made a mistake. The script is running perfectly on my two NAS since several days. There is nothing in 6 1st lines of script which can explains your problem.
The best way to create script is to copy-paste from here directly to vi in ssh session on your NAS.

- I have changed the code of smart_fanspeed.sh : adding a test in order to exclude USB disks ( those who are mounted on /share/USBx )
- I disabled the verbose output when nothing changed, so the output remains short and interesting, even over several days.
- I added a startup script so the script is started when NAS is rebooting:
File /volume1/.@plugins/etc/init.d/S50_smartfanspeed :

Code: Select all

#!/bin/sh
LOGFILE=<YOUR_PATH_HERE>/fanspeed.log

case "$1" in
    start)
fuser $LOGFILE
if [ $? -eq 1 ]
then
        <YOUR PATH_HERE>/smart_fanspeed.sh -v > $LOGFILE 2>&1 &
fi
        ;;

esac
My advice is to set fanspeed in ADM to "medium" or "high". Just in case script is killed, you will not overheat your disks.
Hi sksbir,

First of all I want to congratulate you on the script, it worked fine on my AS3202T as well.

The reason I mark this post is because I would like more details about putting it in "/volume1/.plugins/etc/init.d" so that it runs automatically when the NAS has rebooted and also makes a log, just like you did.

At the moment I have the folder "/volume1/home/admin/fanspeed/" with the file smart_fanspeed.sh inside, how do I create the ~symbolic link~ on "/volume1/.plugins/etc/init.d/" to make it work ?

_________________________

EDIT: Please ignore, was more simple than I expected :D

Code: Select all

script_smart_fanspeed.sh

Code: Select all

#!/bin/sh
LOGFILE=/volume1/home/admin/fanspeed/fanspeed.log

case "$1" in
    start)
fuser $LOGFILE
if [ $? -eq 1 ]
then
        /volume1/home/admin/fanspeed/smart_fanspeed.sh -v > $LOGFILE 2>&1 &
fi
        ;;

esac

Code: Select all

ln -s /volume1/home/admin/fanspeed/script_smart_fanspeed.sh /volume1/.@plugins/etc/init.d/S50_smartfanspeed

Code: Select all

# tail -f /volume1/home/admin/fanspeed/fanspeed.log
Retained devices for temperature check : /dev/sda /dev/sdb
20190131_10:26:04 hottest disk changed from 15 to 38,raising fanpower from 31 to 84
20190131_10:29:51 hottest disk changed from 38 to 37,raising fanpower from 84 to 82
20190131_10:38:42 hottest disk changed from 37 to 36,raising fanpower from 82 to 79
20190131_11:29:36 hottest disk changed from 36 to 35,raising fanpower from 79 to 77
20190131_11:32:26 hottest disk changed from 35 to 36,raising fanpower from 77 to 79
20190131_11:38:17 hottest disk changed from 36 to 35,raising fanpower from 79 to 77
20190131_11:41:07 hottest disk changed from 35 to 36,raising fanpower from 77 to 79
20190131_12:07:59 hottest disk changed from 36 to 35,raising fanpower from 79 to 77
20190131_12:10:50 hottest disk changed from 35 to 36,raising fanpower from 77 to 79
Before the script it was common to see my disks above 43~45ºC on hotter days (like today) and that was making me worried.

Hope Asustor implement more optimized tuning in some future update, in a NAS the temperature/fan control should be based on disks temperatures and not just only in the CPU or System load/temperature.

Thank you, sorry about the bad english and best regards from Brazil :)
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by sksbir »

hi noebr
happy to know that everything is working well.
don't forget to dust off your NAS regularly, my little scripts can't do everything :)
mrcaringi
Posts: 4
Joined: Tue Feb 11, 2020 10:47 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by mrcaringi »

thanks it worked great!

I just have to make some adjustment for the AS6212RD:

https://github.com/MrCaringi/asustor-fa ... s6212rd.sh
Steinus
Posts: 1
Joined: Sat Oct 03, 2020 5:51 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by Steinus »

Good afternoon! I'm from russia and my english is bad, google translator helps me, forgive me :-) Thank you very much for the script, it works very well, but there is a problem, after restarting nas entware-ng does not work, it starts working only after rebooting in app central.
The K52entware-ng and S52entware-ng files in /usr/local/etc/init.d are not missing. I tried to uninstall entware-ng and install entware and the same thing after reboot, only restarting the application in app central helps
AS-5304T (HDD 4x IronWolf 4tb ST4000VN008 RAID5) (DDR4 1 x 4GB)
Keenetic Giga KN-1010
User avatar
father.mande
Posts: 1809
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [how to] fan speed override and fine tuning (v2)

Post by father.mande »

Hi,

Don't understand remark about Entware don't start (Entware-ng MUST be abandoned ... not maintained, no more updated)
Entware is not a program ... the start_up script do :
... create links at boot in /opt to /usr/local/AppCentral/entware/opt/XXXXX folder
... change /etc/profile to add : source /opt/etc/profile
... ... this change PATH and some variable when you connect you using terminal (ssh) to have access to opkg and others entware tools
... run (if exist) start_up script defined in /opt/etc/init.d

SO before running start_up script (if exist) no program are launched
after a boot verify :
that PATH contains /opt/bin and /opt/sbin (normally in first positions)
that link exist in /opt
... if yes ... all is ready to run as expected.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
henson0115
Posts: 6
Joined: Wed Apr 29, 2020 11:27 pm

Re: [how to] fan speed override and fine tuning (v2)

Post by henson0115 »

still no custom speed implementation, whilst ive been running this script for a good year or so now, i wish the hard drives could sleep with it.
Post Reply

Return to “[Official] For AS50xx/51xx Series”