NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

glem's avatar
glem
Aspirant
May 22, 2013

Easy fix fan/temp OS6 issues on x86 legacy #no support

>> EDIT - 2014-04-12 <<
Before to hack your system, update first to 6.1.7. Built-in fancontrol support is there!

6.1.7 has been released: http://www.readynas.com/forum/viewtopic.php?f=1&t=76000
>> EDIT <<

Here is how to fix fan and temperature issues on legacy x86 systems running OS 6.x, until built-in support is there.

I'd previously created this post http://www.readynas.com/forum/viewtopic.php?f=51&t=70133&start=255#p393886 but it will be easier for community to have fancontrol file examples for all models in a dedicated post.

It's a very easy and reliable method to monitor fan and temperature with lm-sensors and fancontrol standard packages.
No change on GUI reports.

NO WARRANTY / NO SUPPORT !!!

with root access, execute the following commands:
apt-get update && apt-get upgrade
apt-get install lm-sensors fancontrol
echo "#fancontrol" > /etc/fancontrol


edit /etc/fancontrol file and copy the following file example corresponding to your model http://www.readynas.com/forum/viewtopic.php?f=51&t=71155#p395324
or create your own /etc/fancontrol file using pwmconfig command http://www.readynas.com/forum/viewtopic.php?f=51&t=71155&p=395324#p395318

fancontrol daemon start automaticaly when you install it.
restart fancontrol daemon for changes in file /etc/fancontrol take effect
/etc/init.d/fancontrol restart


to interact with fancontrol daemon, use
/etc/init.d/fancontrol stop
/etc/init.d/fancontrol start
/etc/init.d/fancontrol restart


You can display sensors values with sensors command
root@nas-xx-xx-xx:~# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +43.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +49.0°C (high = +80.0°C, crit = +100.0°C)

it8721-isa-0a10
Adapter: ISA adapter
in0: +12.19 V (min = +8.06 V, max = +10.66 V) ALARM
in1: +4.98 V (min = +2.20 V, max = +3.51 V) ALARM
in2: +3.28 V (min = +0.02 V, max = +0.18 V) ALARM
in3: +0.00 V (min = +0.00 V, max = +0.00 V) ALARM
in4: +1.02 V (min = +1.42 V, max = +2.21 V) ALARM
in5: +1.80 V (min = +1.66 V, max = +0.54 V) ALARM
in6: -12.10 V (min = -25.78 V, max = -0.01 V)
in7: +3.24 V (min = +0.00 V, max = +2.86 V) ALARM
in8: +3.34 V
fan1: 0 RPM (min = 10 RPM) ALARM
fan2: 0 RPM (min = 44 RPM) ALARM
fan3: 851 RPM (min = 11 RPM)
temp1: +0.0°C (low = +57.0°C, high = -25.0°C) ALARM sensor = thermistor
temp2: +0.1°C (low = -16.0°C, high = -123.0°C) ALARM sensor = thermal diode
temp3: +0.1°C (low = +37.0°C, high = -44.0°C) ALARM sensor = thermal diode
cpu0_vid: +2.050 V

173 Replies

Replies have been turned off for this discussion
  • I think I have other issues. I cannot get fancontrol to work properly. I put this in place, thank you for doing that!

    On the crontab, does */1 mean to use * or 1 in the first field?
  • Paste the script text into a text file using a Linux compatible text editor. In Windows you can use Textpad. Save the file on the Nas with a name like TempUpdate.I store mine in the directory /data/Tims

    Then edit /etc/crontab and add the line below:

    */1 * * * * root /data/Tims/UpdateTemp

    I am no expert but Google is a good help for each step.
  • I am not sure how to build the script. Can you show the commands for that?
  • Ok upgraded to 6.0.8 and the rrd files have been changed. New script is:

    #!/bin/sh
    #######################################################
    Coretemp="/sys/devices/platform/coretemp.0/temp2_input"
    Systemp="/sys/devices/platform/w83627ehf.2576/temp2_input"
    Coretemp2="/sys/devices/platform/coretemp.0/temp3_input"
    Ct=`cat $Coretemp`
    C=`expr $Ct / 1000`
    Ct2=`cat $Coretemp2`
    C2=`expr $Ct2 / 1000`
    St=`cat $Systemp`
    S=`expr $St / 1000`
    rrdtool update /run/readynasd/stats/temperature_int_deg.rrd N:$C:$S



    Edit: There is a problem in 6.0.8 as readynasd also updates the rrd file and gives odd readings on the trend. I have made a hacked elf to stop it, but I would prefer to correct the temperatures it reads and let it update the file itself.
  • If anyone wants their temperatures logged in Frontview in OS6 its just a standard round robin database that is meant to updated by readystatsd. For some reason my Pro 6 wont log anything. I guess there something wrong in readystatsd. It is running fine but fails to update the temperature databases. It's a compiled elf and I am not able to fix it so I made a simple script called every minute from crontab to sort it out. This is my first go at scripting so its a bit basic! My guess is that it will need to be modded for anything other than a Pro 6. Anyone with a bit more knowledge fancy sorting it properly? Ideally it would be best to decompile the elf and fix it at source.


    #!/bin/sh
    #######################################################
    Coretemp="/sys/devices/platform/coretemp.0/temp2_input"
    Systemp="/sys/devices/platform/w83627ehf.2576/temp2_input"
    Coretemp2="/sys/devices/platform/coretemp.0/temp3_input"

    Ct=`cat $Coretemp`
    C=`expr $Ct / 1000`

    Ct2=`cat $Coretemp2`
    C2=`expr $Ct2 / 1000`

    St=`cat $Systemp`
    S=`expr $St / 1000`

    rrdtool update /run/readynasd/stats/temperature_cputemp_deg.rrd N:$C
    rrdtool update /run/readynasd/stats/temperature_systemp_deg.rrd N:$S
    rrdtool update /run/readynasd/stats/temperature_system_deg.rrd N:$S


  • Great topic! Would love to see a config for Ultra4
  • Thanks to the forum, which gives examples for some systems ( /etc/fancontrol file ):

    Example values for Ultra4 model:
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/it87.2576
    DEVNAME=hwmon0=coretemp hwmon1=it8721
    FCTEMPS=hwmon1/device/pwm1=hwmon0/device/temp2_input
    FCFANS= hwmon1/device/pwm1=hwmon1/device/fan1_input
    MINTEMP= hwmon1/device/pwm1=50
    MAXTEMP= hwmon1/device/pwm1=60
    MINSTART= hwmon1/device/pwm1=60
    MINSTOP= hwmon1/device/pwm1=60
    MINPWM= hwmon1/device/pwm1=60
    MAXPWM= hwmon1/device/pwm1=255


    Example values for Ultra6 model:
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/it87.2576
    DEVNAME=hwmon0=coretemp hwmon1=it8721
    FCTEMPS= hwmon1/device/pwm3=hwmon0/device/temp2_input
    FCFANS= hwmon1/device/pwm3=hwmon1/device/fan3_input
    MINTEMP= hwmon1/device/pwm3=51
    MAXTEMP= hwmon1/device/pwm3=58
    MINSTART= hwmon1/device/pwm3=40
    MINSTOP= hwmon1/device/pwm3=40
    MINPWM= hwmon1/device/pwm3=40
    MAXPWM= hwmon1/device/pwm3=255


    Example values for Pro6 model:
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/w83627ehf.2576
    DEVNAME=hwmon0=coretemp hwmon1=w83627dhg
    FCTEMPS= hwmon1/device/pwm2=hwmon1/device/temp2_input hwmon1/device/pwm1=hwmon1/device/temp1_input
    FCFANS= hwmon1/device/pwm2=hwmon1/device/fan2_input hwmon1/device/pwm1=hwmon1/device/fan1_input
    MINTEMP= hwmon1/device/pwm2=30 hwmon1/device/pwm1=55
    MAXTEMP= hwmon1/device/pwm2=60 hwmon1/device/pwm1=60
    MINSTART= hwmon1/device/pwm2=70 hwmon1/device/pwm1=16
    MINSTOP= hwmon1/device/pwm2=70 hwmon1/device/pwm1=16
    MINPWM= hwmon1/device/pwm2=70 hwmon1/device/pwm1=16
    MAXPWM= hwmon1/device/pwm2=200 hwmon1/device/pwm1=80


    Example values for 2100V2 model:
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/it87.2576
    DEVNAME=hwmon0=coretemp hwmon1=it8721
    FCTEMPS=hwmon1/device/pwm3=hwmon0/device/temp2_input hwmon1/device/pwm2=hwmon0/device/temp2_input hwmon1/device/pwm1=hwmon0/device/temp2_input
    FCFANS=hwmon1/device/pwm3=hwmon1/device/fan2_input hwmon1/device/pwm2=hwmon1/device/fan1_input hwmon1/device/pwm1=
    MINTEMP=hwmon1/device/pwm3=51 hwmon1/device/pwm2=51 hwmon1/device/pwm1=51
    MAXTEMP=hwmon1/device/pwm3=58 hwmon1/device/pwm2=58 hwmon1/device/pwm1=75
    MINSTART=hwmon1/device/pwm3=40 hwmon1/device/pwm2=40 hwmon1/device/pwm1=150
    MINSTOP=hwmon1/device/pwm3=40 hwmon1/device/pwm2=40 hwmon1/device/pwm1=0
    MINPWM=hwmon1/device/pwm3=40 hwmon1/device/pwm2=40
    MAXPWM=hwmon1/device/pwm3=255 hwmon1/device/pwm2=255
  • To create your own /etc/fancontrol file, use pwmconfig command
    Here is an example for Ultra 6 model

    execute the following commands and give answers according to your system
    /etc/init.d/fancontrol stop
    pwmconfig

    # pwmconfig revision 5857 (2010-08-22)
    This program will search your sensors for pulse width modulation (pwm)
    controls, and test each one to see if it controls a fan on
    your motherboard. Note that many motherboards do not have pwm
    circuitry installed, even if your sensor chip supports pwm.

    We will attempt to briefly stop each fan using the pwm controls.
    The program will attempt to restore each fan to full speed
    after testing. However, it is ** very important ** that you
    physically verify that the fans have been to full speed
    after the program has completed.

    Found the following devices:
    hwmon0/device is coretemp
    hwmon1/device is it8721

    Found the following PWM controls:
    hwmon1/device/pwm1
    hwmon1/device/pwm2
    hwmon1/device/pwm3

    Giving the fans some time to reach full speed...
    Found the following fan sensors:
    hwmon1/device/fan1_input current speed: 0 ... skipping!
    hwmon1/device/fan2_input current speed: 0 ... skipping!
    hwmon1/device/fan3_input current speed: 2265 RPM

    Warning!!! This program will stop your fans, one at a time,
    for approximately 5 seconds each!!!
    This may cause your processor temperature to rise!!!
    If you do not want to do this hit control-C now!!!
    Hit return to continue: >> hit return <<

    Testing pwm control hwmon1/device/pwm1 ...
    hwmon1/device/fan3_input ... speed was 2265 now 2265
    no correlation

    No correlations were detected.
    There is either no fan connected to the output of hwmon1/device/pwm1,
    or the connected fan has no rpm-signal connected to one of
    the tested fan sensors. (Note: not all motherboards have
    the pwm outputs connected to the fan connectors,
    check out the hardware database on http://www.almico.com/forumindex.php)

    Did you see/hear a fan stopping during the above test (n)? >> n <<

    Testing pwm control hwmon1/device/pwm2 ...
    hwmon1/device/fan3_input ... speed was 2265 now 2257
    no correlation

    No correlations were detected.
    There is either no fan connected to the output of hwmon1/device/pwm2,
    or the connected fan has no rpm-signal connected to one of
    the tested fan sensors. (Note: not all motherboards have
    the pwm outputs connected to the fan connectors,
    check out the hardware database on http://www.almico.com/forumindex.php)

    Did you see/hear a fan stopping during the above test (n)? >> n <<

    Testing pwm control hwmon1/device/pwm3 ...
    hwmon1/device/fan3_input ... speed was 2265 now 0
    It appears that fan hwmon1/device/fan3_input
    is controlled by pwm hwmon1/device/pwm3
    Would you like to generate a detailed correlation (y)? >> y <<
    PWM 255 FAN 2257
    PWM 240 FAN 2250
    PWM 225 FAN 2235
    PWM 210 FAN 2213
    PWM 195 FAN 2149
    PWM 180 FAN 2083
    PWM 165 FAN 2020
    PWM 150 FAN 1934
    PWM 135 FAN 1849
    PWM 120 FAN 1748
    PWM 105 FAN 1646
    PWM 90 FAN 1520
    PWM 75 FAN 1380
    PWM 60 FAN 1218
    PWM 45 FAN 1040
    PWM 30 FAN 831
    PWM 28 FAN 416
    PWM 26 FAN 512 (probably incorrect)
    PWM 24 FAN 512 (probably incorrect)
    PWM 22 FAN 516 (probably incorrect)
    PWM 20 FAN 516 (probably incorrect)
    PWM 18 FAN 517 (probably incorrect)
    PWM 16 FAN 519 (probably incorrect)
    PWM 14 FAN 521 (probably incorrect)
    PWM 12 FAN 522 (probably incorrect)
    PWM 10 FAN 522 (probably incorrect)
    PWM 8 FAN 521 (probably incorrect)
    PWM 6 FAN 519 (probably incorrect)
    PWM 4 FAN 516 (probably incorrect)
    PWM 2 FAN 0
    Fan Stopped at PWM = 2


    Testing is complete.
    Please verify that all fans have returned to their normal speed.

    The fancontrol script can automatically respond to temperature changes
    of your system by changing fanspeeds.
    Do you want to set up its configuration file now (y)? >> y <<
    What should be the path to your fancontrol config file (/etc/fancontrol)? >> hit return <<
    Loading configuration from /etc/fancontrol ...

    Select fan output to configure, or other action:
    1) hwmon1/device/pwm3 3) Just quit 5) Show configuration
    2) Change INTERVAL 4) Save and quit
    select (1-n): >> 1 <<

    Devices:
    hwmon0/device is coretemp
    hwmon1/device is it8721

    Current temperature readings are as follows:
    hwmon0/device/temp2_input 38
    hwmon0/device/temp3_input 38
    hwmon1/device/temp1_input 0
    hwmon1/device/temp2_input 0
    hwmon1/device/temp3_input 0

    Select a temperature sensor as source for hwmon1/device/pwm3:
    1) hwmon0/device/temp2_input
    2) hwmon0/device/temp3_input
    3) hwmon1/device/temp1_input
    4) hwmon1/device/temp2_input
    5) hwmon1/device/temp3_input
    6) None (Do not affect this PWM output)
    select (1-n): >> 1 <<

    Enter the low temperature (degree C)
    below which the fan should spin at minimum speed (20): >> 51 <<

    Enter the high temperature (degree C)
    over which the fan should spin at maximum speed (60): >> 58 <<

    Enter the minimum PWM value (0-255)
    at which the fan STOPS spinning (press t to test) (100): >> 40 <<

    Enter the minimum PWM value (40-255)
    at which the fan STARTS spinning (press t to test) (150): >> 40 <<

    Enter the PWM value (0-40) to use when the temperature
    is below the low temperature limit (0): >> 40 <<

    Enter the PWM value (40-255) to use when the temperature
    is over the high temperature limit (255): >> 255 <<


    Select fan output to configure, or other action:
    1) hwmon1/device/pwm3 3) Just quit 5) Show configuration
    2) Change INTERVAL 4) Save and quit
    select (1-n): >> 4 <<

    Saving configuration to /etc/fancontrol...
    Configuration saved
    /etc/init.d/fancontrol start

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More