Ad Widget

Collapse

Use telnet.run problem!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dagun
    Member
    • Sep 2009
    • 71

    #1

    Use telnet.run problem!

    If I use telnet.run, the shell scripts is a long code:
    totala=`head -1 /proc/stat | awk '{print $2+$3+$4+$5}'`;idlea=`head -1 /proc/stat | awk '{print $5}'`;sleep 2;idleb=`head -1 /proc/stat | awk '{print $5}'`;totalb=`head -1 /proc/stat | awk '{print $2+$3+$4+$5}'`;total=$[$totalb-$totala];idle=$[$idleb-$idlea];free=$[$idle*100/$total];echo $free

    I want to execute it to get the free of cpu info , I won't get correct result. Who have test it?
Working...