- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Thank you drewttt for your extra line of code to help me to also control my fan on hard drive temperature!
Kind Regards,
uuiese
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
The fan on my 102 would spin at 750-800rpm regardless of temperature. HD temps have dropped from 44C to 38C and cpu temp from 68C to 54C under load.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
It would make sense for Netgear to add these fan profile adjustments in to readycloud GUI, so that users could select suitable profile for their use based on environment temperature and other factors.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
I recently setup my new 314 and attempted to use this script but it doesn't seem to be working. The fan stays 730-780 rpm with temps as follows:
Fan - 750RPM
CPU - 53
system - 39
Disk 1 - 43
Disk 2 - 41
Disk 3 - 45
Disk 4 - 48
This is without any activity at all, just the disks spinning, not in a volume.
I'm wondering if anyone has implemented this successfully on a 314 because i'm not getting any errors and the service seems to be starting.
I've also tried changing the min and max temp to 40 and 60 respectively but still no change.
any help much appreciated
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Not sure if anyone is interested but I had a look at the logs for this from my 314 and it's now obvious to me why it's not working but not so obvious as to the fix. If anyone is interested in getting more info, reply to the thread.
Automatically controlling fan speed...
cat: /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1: No such file or directory
cat: /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/fan1_input: No such file or directory
cat: /sys/devices/platform/axp-temp.0/temp1_input: No such file or directory
Temp: C FAN: 50% [ RPM] []
expr: syntax error
expr: syntax error
expr: syntax error
/root/fanoveride: line 21: [: -lt: unary operator expected
/root/fanoveride: line 24: [: -gt: unary operator expected
expr: syntax error
expr: syntax error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
I'm a total linux newbie so I really don't know. I just got this to work through trial and error and my limited programming knowledge.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
insserv: Script fanoveride is broken: incomplete LSB comment.
insserv: missing `Provides:' entry: please add.
insserv: missing `Required-Start:' entry: please add even if empty.
insserv: missing `Required-Stop:' entry: please add even if empty.
insserv: missing `Default-Start:' entry: please add even if empty.
insserv: missing `Default-Stop:' entry: please add even if empty.
insserv: warning: script 'leafp2p' missing LSB tags and overrides
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
I had been on 6.3.3-T153 beta, so I went back to 6.2.2 to see if the beta was an issue and that put my fan speeds in the 680s range...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Created the two files as per the first post (using notepad++ but what file format am I supposed to save them in, .sh? or are they not meant to have a file extension at all) and put them in the appropriate location using Bitvise SFTP.
Once i've changed the properties value to 755 and run the "update-rc.d fanoveride defaults" I receive an error "insserv: warning: script 'leafp2p' missing LSB tags and overrides" ?
I appear to be missing something here and it will probably be obvious to the more experienced people out there, pointers appreciated.
Lee
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
root@Lee-NAS:/etc/init.d# chmod 755 /etc/init.d/fanoveride
root@Lee-NAS:/etc/init.d# update-rc.d fanoveride defaults
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'leafp2p' missing LSB tags and overrides
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Can someone help me to change the scripts found on the first post of this thread to work on a RN204?
I've used find / | grep to locate "pwm1", "fan1_input" and "temp1_input".
I found them and changed the "FANPWMPATH", "FANSPEEDPATH", "CORETEMPPATH" and "$NEWPWM" to the new locations, but no joy. 😞
The service starts, is running but there is no change in the fan speed, even with a lower "MAXTEMP".
Can anyone help me?
Thanks for everything!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Thanks your scripts work like a champ 🙂 tested on RN104 and RN102
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
Followed the instructions to a T. Installed fine, with only one error shown below.
With the exception of changing "retart" to "restart" and no "+" in "chmod +755 /etc/init.d/fanoveride". Service starts but no change in fan speed. Anyone else having this issue on 6.2.x (i'm running 6.2.4).
Oh, I actually did get one error on: "update-rc.d fanoveride defaults"
LSB issue on leafp2p. Change /etc/init.d/leafp2p
insserv: warning: script 'leafp2p' missing LSB tags and overrides
insserv: There is a loop between service logitechmediaserver and leafp2p if stopped
insserv: loop involving service leafp2p at depth 2
insserv: loop involving service logitechmediaserver at depth 1
insserv: Stopping leafp2p depends on logitechmediaserver and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
Also posted over here: https://community.netgear.com/t5/Using-your-ReadyNAS/LSB-issue-on-leafp2p/td-p/929396
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to control fanspeed on a RN104
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
-------------------------------------------------------------------------------------------------