NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
AMRivlin
Mar 21, 2013Apprentice
OS6 now works on x86 Legacy WARNING: NO NTGR SUPPORT!
Update: It is now unofficially possible using NTGR images to update legacy hardware to os6.X See Post #3, for directions to install 6.2.1 on x86 Ultra and Pro Models. (ARM NOT SUPPORTED by this OS) ...
- Jan 21, 2016
mdgm and I have decided that its time to lock this thread. So please do post any new OS6 on Legacy issues on their own threads.
martroy
May 04, 2013Aspirant
I've also installed it on my brand new Ultra 4 that I got at a clearance price... At first, I had some problems adding a second drive to create a mirror (2x 2TB WD Red). It was trying to use it as a second volume with no name. I couldn't delete it because of that. I've resolved this by doing a factory reset and copying my stuff back. Now, everything is working fine. I'd really like to have the temp and the fan speed in the GUI but I can live with that for now.
In the meantime, I've adapted Royan's script to run on the Ultra 4 (single CPU, some optimizations, etc.). All credits go to him.
As usual, here is the disclaimer :
I'm not responsible of any damages caused by this script...
So, here it is :
In the meantime, I've adapted Royan's script to run on the Ultra 4 (single CPU, some optimizations, etc.). All credits go to him.
As usual, here is the disclaimer :
I'm not responsible of any damages caused by this script...
So, here it is :
#!/bin/bash
# log and send mail
function sendmail {
( echo "To:$email_address"
echo "From:$email_address"
echo "Subject:$host: temp-monitor: $1"
echo
echo "$2" ) | /usr/sbin/sendmail -t --read-envelope-from
echo $message >> $log
}
# files
lock="/tmp/.fan-monitor.lock" # lock file (needed?)
log="/var/log/fan-monitor.log" # log file
pwm_file="/sys/devices/platform/it87.2576/pwm1" # pwm file
# misc
dt=$(date +"%F %R") # get timestamp for logging
email_address="<your_email_address>"
host=`hostname`
# superuser check
if [[ $EUID -ne 0 ]]; then # check if process is running as superuser
echo $dt "This script must be run as root" >> $log # need su to write pwm file
exit 10
fi
# check for lock
[ -f "$lock" ] && exit # exit if another instance of this script
>$lock # is writing to pwm file (not nessesary?)
# get output from sensors into an array
OLDIFS="$IFS" # store current IFS
IFS=$'\n' # set IFS to newline
list=(`sensors`) # populate array from sensors output
IFS="$OLDIFS" # restore original IFS
# get values from array
cpu0=$(echo ${list[2]} | cut -f3 -d' ' | grep -P -o "[0-9.]+" | cut -f1 -d'.') # sensors cpu0 temperature
fan=$(echo ${list[14]} | cut -f2 -d' ') # sensors fan speed
fan_min=$(echo ${list[14]} | cut -f7 -d' ') # sensors minimum fan speed
# read pwm values
pwm=$(cat $pwm_file) # pwm value from pwm file
pwm_min=50 # known minimum value
pwm_max=255 # known maximum value
# determine cpu with highest temperature
cpu=0
cpu_name=""
cpu=$cpu0
cpu_name="CPU0"
# verify cpu test has returned a value
if ((cpu == 0)); then
message="$dt: CPU test failed, cpu0: $cpu0, cpu1: $cpu1"
sendmail "ERROR" "$message"
rm -f $lock # cleanup lock
exit 11 # exit error code
fi
# set the new pwm value for the fan speed.
if ((cpu < 50)); then
new_pwm=$pwm_min
elif ((cpu > 70)); then
new_pwm=$pwm_max
else
let new_pwm=($cpu-50)*10+50
fi
# check new pwm value
if ((new_pwm == 0)); then # no new pwm value = no need to do anything
echo "$dt: OK: $cpu_name: $cpu, pwm: $pwm" >> $log # log ok status if you want to keep track of what's happening
rm -f $lock # cleanup locks
exit 0 # exit with ok status
fi
# don't resend emails if there is no change from previous run
if ((new_pwm != pwm)); then
# ok, now we have a new pwm value and need to set it
command_out=$( `echo $new_pwm > $pwm_file` 2>&1 ) # write new pwm value to pwm file, and catch any output
command_rc=$? # get error codes
uptime=$(echo `uptime`) # get extra data for email
if (( command_rc == 0)); then
# no errors setting pwm.
message="$dt: pwm changed: $pwm -> $new_pwm, $cpu_name temp: $cpu, fan: $fan uptime: $uptime"
sendmail "Fan speed changed" "$message"
else
# oops, we got an error setting new pwm.
message="$dt: ERROR setting pwm: $pwm -> $new_pwm, $cpu_name temp: $cpu, fan: $fan uptime: $uptime - ERRROR rc: $command_rc, stdout and stderr: $command_out"
sendmail "ERROR" "$message"
fi
fi
#cleanup locks
rm -f $lock
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!