Idle time nas200

Discussion in 'Cisco/Linksys Network Storage Devices' started by Jan Sterenborg, Jan 31, 2014.

  1. Jan Sterenborg

    Jan Sterenborg Serious Server Member

    Hello Jac,
    is there a script for altering the idle time of the nas200? i am using Jac4 firmware
    Now the idletime is set to 10 minutes and it takes about a half hour before the nas200 is in rest
    i want to speed up this time
    thanks
     
    Last edited: Jan 31, 2014
  2. Jan Sterenborg

    Jan Sterenborg Serious Server Member

    Is this perhaps a useful script?
    from the thread
    Nas200 heat issues
    http://www.linksysinfo.org/index.php?posts/150635/


    Code:
    #!/bin/sh
    
    MAX_TEMP=30
    LOG_FILE="/harddisk/usb/html/stat.txt"
    
    # device takes about 3 min to boot so lets sleep for first 5mins
    echo 'device takes about 3 min to boot so lets sleep for first 5mins' > $LOG_FILE
    sleep 300
    
    # stand by after 5min (12 = 1 min)
    echo 'set drive standby time to 5mins' > $LOG_FILE
    hdparm -S 60 /dev/sda >/dev/null 2>&1
    hdparm -S 60 /dev/sdb >/dev/null 2>&1
    
    while true; do
            # not sure what this does, might as well kill it...
            killall CheckHDDPower >/dev/null 2>&1
            killall CheckHDDDrive >/dev/null 2>&1
    
            #### is being used ####
            used="`netstat -ne | grep tcp | wc -l`"
            mode="fan_off"
    
            if [ $used -eq 0 ]; then
                    #### Spin down drive if nothing is connected to it ####
                    LOG='Spinning down drives'
                    hdparm -y /dev/sda >/dev/null 2>&1
                    hdparm -y /dev/sdb >/dev/null 2>&1
            else
                    #### check temps ####
                    hda=`/usr/sbin/smartctl -A /dev/sda | grep 'Temperature_Celsius'`
                    hdb=`/usr/sbin/smartctl -A /dev/sdb | grep 'Temperature_Celsius'`
                    hda=`echo ${hda#*-} | sed 's/ *\([0-9]*\)/\1/g'`
                    hdb=`echo ${hdb#*-} | sed 's/ *\([0-9]*\)/\1/g'`
    
                    #### get highest temp ####
                    if [ $hda -gt $hdb ]; then
                            temp=$hda
                    else
                            temp=$hdb
                    fi
    
    
                    #### work out fan mode  ####
                    if [ $temp -gt $MAX_TEMP ]; then
                            mode="fan_on"
                            LOG="FAN:ON  hd1:$hda hd2:$hdb max fan temp:$MAX_TEMP"
                    else
                            LOG="FAN:OFF hd1:$hda hd2:$hdb max fan temp:$MAX_TEMP"
                    fi
    
            fi
    
            echo $LOG > $LOG_FILE
    
            #### do it for a minute with 5 second gaps ####
            Set_Led $mode
            for i in 1 2 3 4 5 6 7 8 9 10 11; do
                    sleep 5
                    Set_Led $mode
            done
    done
     
  3. Jan Sterenborg

    Jan Sterenborg Serious Server Member

    Can someone describe what the above script does?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice