just a request

Discussion in 'HyperWRT Firmware' started by Fr_rene, May 14, 2006.

  1. Fr_rene

    Fr_rene Network Guru Member

    Hello people!!
    on this link
    http://wrt-wiki.bsr-clan.de/index.php?title=Useful_Scripts
    there a useful script for checking the average load router's
    infortunatly he doesn't work on thibor firmware.

    somebody have a solution for made it compatible with thibor 15c firmware ??

    Thanx for response !!!

    rene,
    french people speaking bad english !!!
     
  2. Fr_rene

    Fr_rene Network Guru Member

  3. Thibor

    Thibor Super Moderator Staff Member Member

    Code:
    #!/bin/sh
    gpio="led"
    
    delay=3
    
    meltdown=400
    overload=100
    highload=70
    medload=30
    
    
    while sleep $delay
    do
       load=$(cat /proc/loadavg | cut -d " " -f1 | tr -d ".")
    
       if [ $load -gt $meltdown ]
       then
           $gpio am of
           usleep 50000
           $gpio white of
           usleep 50000
           reboot
       elif [ $load -gt $overload ]
       then
          $gpio amber of
          usleep 50000
       elif [ $load -gt $highload ]
       then
          $gpio amber of
          usleep 12500
          $gpio amber on
          usleep 12500
          $gpio amber of
          usleep 12500
          $gpio amber on
          usleep 12500
          $gpio amber of
          usleep 12500
          $gpio amber on
          usleep 12500
       elif [ $load -gt $medload ]
       then
          $gpio amber on
          $gpio white of
          usleep 25000
          $gpio white on
          usleep 25000
          $gpio white of
          usleep 25000
          $gpio white on
          usleep 25000
       else
          $gpio white of
          usleep 50000
          $gpio white on
          usleep 50000
       fi
        load=000
    done
    
     
  4. Fr_rene

    Fr_rene Network Guru Member

    Thanx thibor !!!!!
     
  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