NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
dishmagic66
Apr 26, 2014Guide
How to control fanspeed on a RN104
On special request, here is a workaround for controling the fanspeed of the RN104 ( most likely the same on a 102). For this you will have to SSH in to the NAS. Thanks to Moseleypj for doing the ...
Aguster
Aug 16, 2015Initiate
Got it to work on 6.2.5. There are a few changes that are required. Directory names have changed since the first version of script was created for 6.1.x
For /root/fanoveride:
Change the variable fan speed values as you see fit. The ReadyNAS104 that I am working with is in a Law Office, under a desk so it has a tendency to get warm. I was seeing CPU temps up to 170 and drives at 120. Way to hot for my liking. With this, I now see drives are 96 and the CPU at 130 or lower.
Highly recommend you use Nano for file creation- run this command: "apt-get install nano" As many others have stated, do not copy and paste from notepad.
/root/fanoveride:
-------------------------------------------------------------------------------------------------
#!/bin/bash
## Variables ##
FANPWMPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
FANSPEEDPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/fan1_input
CORETEMPPATH=/sys/devices/platform/axp-temp.0/temp1_input
MAXFAN=100 # Maximum operable speed
MINFAN=0 # Minimum operable speed
MINPWM=75 # PWM Limit
MAXPWM=255 # PWM Limit
MINTEMP=35 # Min temp -> Fan slowest
MAXTEMP=60 # Max temp -> Fan fastest
NEWSPEED=65 # Initial fan speed (%)
## Functions ##
function getReadings {
FANPWM=$(cat $FANPWMPATH)
FANSPEED=$(cat $FANSPEEDPATH)
CORETEMP=$(cat $CORETEMPPATH)
}
function setFanSpeed {
if [ $NEWSPEED -lt $MINFAN ]; then
NEWSPEED=$MINFAN
fi
if [ $NEWSPEED -gt $MAXFAN ]; then
NEWSPEED=$MAXFAN
fi
NEWPWM=$(expr $MAXPWM - $MINPWM)
NEWPWM=$(expr $NEWPWM \* $NEWSPEED)
NEWPWM=$(expr $NEWPWM / 100)
NEWPWM=$(expr $NEWPWM + $MINPWM)
echo $NEWPWM > /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
}
function calcFanPercent {
TEMPRAN=$(expr $MAXTEMP - $MINTEMP)
TEMPREL=$(expr $CORETEMP - $MINTEMP)
TEMPREL=$(expr $TEMPREL \* 100)
TEMPPER=$(expr $TEMPREL / $TEMPRAN)
NEWSPEED=$TEMPPER
}
###################################################################
echo "Automatically controlling fan speed..."
while true
do
getReadings
echo "Temp: $CORETEMP C FAN: $NEWSPEED% [$FANSPEED RPM] [$FANPWM]"
calcFanPercent
setFanSpeed
sleep 10
done
###################################################################
-----------------------------------------------------------------------------------------------------------
For /etc/init.d/fanoveride
-----------------------------------------------------------------------------------------------------------
#!/bin/sh
### BEGIN INIT INFO
# Provides: FanOveride
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: FanOveride overides the default ReadyNAS fan control
### END INIT INFO
SCRIPT=~/fanoveride
RUNAS=root
PIDFILE=/var/run/fanoveride.pid
LOGFILE=/var/log/fanoveride.log
start() {
if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then
echo 'Service already running' >&2
return 1
fi
echo 'Starting service.' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
su -c "$CMD" $RUNAS > "$PIDFILE"
echo 'Service started' >&2
}
stop() {
if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then
echo 'Service not running' >&2
return 1
fi
echo 'Stopping service.' >&2
kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
echo 'Service stopped' >&2
}
uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
local SURE
read SURE
if [ "$SURE" = "yes" ]; then
stop
rm -f "$PIDFILE"
echo "Notice: log file is not be removed: '$LOGFILE'" >&2
update-rc.d -f <NAME> remove
rm -fv "$0"
fi
}
case "$1" in
start)
start
;;
stop)
stop
uninstall)
uninstall
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|uninstall}"
esac
-------------------------------------------------------------------------------------------------
Ektoplasm63
Sep 13, 2015Aspirant
Many thanks for those who done that script !!!
My RN104 goes significally colder !!!
Before :
HDD1 : 48°C
HDD2 : 51°C
HDD3 : 50°C
HDD4 : 47°C
CPU : 75°C !!!
FAN : 750-800 RPM (Not going beyond that !!!)
Now :
HDD1 : 37°C
HDD2 : 40°C
HDD3 : 39°C
HDD4 : 36°C
CPU : 50°C -> I feel much better :D
FAN : 1350RPM
I don't understand why Netgear won't build this in firmware ... The default temperatures are too Hot !!!
Aguster there is a little error in your last script :
case "$1" in start) start ;; stop) stop ;; -> missing -> One empty line excess uninstall) uninstall ;; restart) stop start ;; *) echo "Usage: $0 {start|stop|restart|uninstall}" esac
For my part, I migrated for Qnap, they are more professional ...
Related Content
NETGEAR Academy

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