NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
AMRivlin
Mar 20, 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.
Iridabike
Feb 28, 2014Aspirant
Yes the scripting echo is only way on Pro 6. Here is my script with an auto dim and scroll of info. Undim with backup button hold.
#!/bin/bash
ROTATION_DELAY=10
NET_INT=eth0
HDD_DEV=/dev/md0
RAID_DEV=/data
# LCD Flags
LCD_SHOW_MEM=1
LCD_SHOW_CPU=1
LCD_SHOW_SYS=1
LCD_SHOW_NET=1
LCD_SHOW_IP=1
LCD_SHOW_TIME=1
LCD_SHOW_HDD=1
Count=0
Coretemp="/sys/devices/platform/coretemp.0/temp2_input"
Systemp="/sys/devices/platform/w83627ehf.2576/temp2_input"
button="/sys/devices/system/rn_button/rn_button0/backup_button"
# ---- LCD Management Functions ----
# Change state of LCD backlight
function set_backlighton
{
echo 1 > /sys/devices/system/rn_lcd/rn_lcd0/lcd_backlight
}
# Change state of LCD backlight
function set_backlightoff
{
echo 0 > /sys/devices/system/rn_lcd/rn_lcd0/lcd_backlight
sleep 5
}
# Write string to LCD device
function print_lcd
{
#echo $Count
# b=`cat /sys/devices/system/rn_button/rn_button0/backup_button`
# if [ $b = 1 ]; then
# set_backlighton
# nohup /data/Tims/vobcopyUSB 2>/dev/null&
# Count=1
# fi
if [ $Count -gt 0 ]; then
Count=`expr $Count + 1`
fi
if [ $Count -gt 30 ]; then
reset_lcd
Count=0
fi
if [ $Count -gt 0 ]; then
if [ $1 = 0 ]; then
printf "%-17.17s" $2 > /sys/devices/system/rn_lcd/rn_lcd0/lcd_line1
else
printf "%-17.17s" $2 > /sys/devices/system/rn_lcd/rn_lcd0/lcd_line2
fi
fi
}
function reset_lcd
{
printf "%-17.17s" " " > /sys/devices/system/rn_lcd/rn_lcd0/lcd_line1
printf "%-17.17s" " " > /sys/devices/system/rn_lcd/rn_lcd0/lcd_line2
sleep 1
set_backlightoff
}
# ---- Statistics Generation Functions ----
# Each function below produces a string of information for display on one line of the LCD.
# Generate memory usage info
function get_meminfo
{
local s=""
sMemUsed=$(free -m | awk 'NR == 2 {print $3;}')
sMemTotal=$(free -m | awk 'NR == 2 {print $2;}')
s="RAM:"$sMemUsed"MB/"$sMemTotal"MB"
echo $s
}
# Generate swap usage info
function get_swapinfo
{
local s=""
sSwapUsed=$(free -m | awk 'NR == 4 {print $3;}')
sSwapTotal=$(free -m | awk 'NR == 4 {print $2;}')
s="Swap:"$sSwapUsed"MB/"$sSwapTotal"MB"
echo $s
}
# Generate system availability info
function get_uptimeinfo
{
local s=""
sUp=$(cat /proc/uptime | awk '{print $1;}' | cut -f1 -d.)
let "sUp /= 3600"
# sUnit=$(uptime | awk '{print $4;}' | cut -b1)
sUsers=$(uptime | awk '{print $4;}')
s="Up:"$sUp"h/Users:"$sUsers
echo $s
}
# Generate domain name info
function get_hostnameinfo
{
local s=""
sHostname=$(hostname -f)
s=$sHostname
echo $s
}
# Generate CPU load average info
function get_loadinfo
{
local s=""
sOneLoad=$(uptime | awk '{print $8;}' | cut -d, -f1)
sFifteenLoad=$(uptime | awk '{print $10;}' | cut -d, -f1)
s="Load:"$sOneLoad"/"$sFifteenLoad
echo $s
}
# Generate CPU processes info
function get_procinfo
{
local s=""
sProcs=$(ps ax | wc -l | awk '{print $1}')
s="Processes:"$sProcs
echo $s
}
# Generate network interface received data info
function get_ethrxinfo
{
local s=""
sRX=$(ifconfig $NET_INT | grep "RX bytes:" | awk '{print $2}' | cut -b7-64)
let "sRX /= 1048576"
s="Rcvd:"$sRX"MB"
echo $s
}
# Generate network interface sent data info
function get_ethtxinfo
{
local s=""
sTX=$(ifconfig $NET_INT | grep "RX bytes:" | awk '{print $6}' | cut -b7-64)
let "sTX /= 1048576"
s="Sent:"$sTX"MB"
echo $s
}
# Generate network interface IP address info
function get_ipinfo
{
local s=""
sIPV4=$(ifconfig $NET_INT | awk 'NR == 2 {print $2;}' | cut -b6-19)
s="IP:"$sIPV4
echo $s
}
# Generate network interface MTU info
function get_mtuinfo
{
local s=""
sMTU=$(ifconfig $NET_INT | awk 'NR==4 {print $5}')
s=$sMTU
echo $s
}
# Generate system date info
function get_dateinfo
{
Ct=`cat $Coretemp`
C=`expr $Ct / 1000`
echo "CpuTemp:"$C"'C"
}
# Generate system time info
function get_timeinfo
{
St=`cat $Systemp`
S=`expr $St / 1000`
echo "SysTemp:"$S"'C"
}
# Generate free disc info for system partition
function get_syshdinfo
{
local s=""
sUsedSys=$(df -h $HDD_DEV | awk 'NR == 2 {print $3}')
sTotalSys=$(df -h $HDD_DEV | awk 'NR == 2 {print $2}')
s="Sys:"$sUsedSys"/"$sTotalSys
echo $s
}
# Generate free disc info for raid array partition
function get_raidhdinfo
{
local s=""
sUsedRaid=$(df -h $RAID_DEV | awk 'NR == 2 {print $3}')
sTotalRaid=$(df -h $RAID_DEV | awk 'NR == 2 {print $2}')
s="RAID:"$sUsedRaid"/"$sTotalRaid
echo $s
}
set_backlightoff
# ---- Main Function ----
# Display a series of statistics on the LCD
while :
do
# Display Memory Information
if [ $Count -gt 0 ]; then
if [ $LCD_SHOW_MEM = 1 ]; then
print_lcd 0 `get_meminfo`
print_lcd 1 `get_swapinfo`
sleep $ROTATION_DELAY
fi
# Display Disk Space Information
if [ $LCD_SHOW_HDD = 1 ]; then
print_lcd 0 `get_syshdinfo`
print_lcd 1 `get_raidhdinfo`
sleep $ROTATION_DELAY
fi
# Display CPU Information
if [ $LCD_SHOW_CPU = 1 ]; then
print_lcd 0 `get_procinfo`
print_lcd 1 `get_loadinfo`
sleep $ROTATION_DELAY
fi
# Display System Information
if [ $LCD_SHOW_SYS = 1 ]; then
print_lcd 0 `get_hostnameinfo`
print_lcd 1 `get_uptimeinfo`
sleep $ROTATION_DELAY
fi
# Display Network Transport Information
if [ $LCD_SHOW_NET = 1 ]; then
print_lcd 0 `get_ethtxinfo`
print_lcd 1 `get_ethrxinfo`
sleep $ROTATION_DELAY
fi
# Display Network IP Information
if [ $LCD_SHOW_IP = 1 ]; then
print_lcd 0 `get_ipinfo`
print_lcd 1 `get_mtuinfo`
sleep $ROTATION_DELAY
fi
# Display Date and Time Information
if [ $LCD_SHOW_TIME = 1 ]; then
print_lcd 0 `get_dateinfo`
print_lcd 1 `get_timeinfo`
sleep $ROTATION_DELAY
fi
else
sleep $ROTATION_DELAY
b=`cat /sys/devices/system/rn_button/rn_button0/backup_button`
if [ $b = 1 ]; then
set_backlighton
nohup /data/Tims/vobcopyUSB 2>/dev/null&
Count=1
fi
fi
done
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!