Changeset 31 for trunk/tool

Show
Ignore:
Timestamp:
04/23/07 11:37:38 (15 years ago)
Author:
andreu
Message:

now, only subnets rrd files from routers who are seeing will be created - new scripts in tool

Location:
trunk/tool
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tool/metro.php

    r30 r31  
    5656                rsort($tab_in,SORT_NUMERIC); 
    5757                rsort($tab_out,SORT_NUMERIC); 
    58                 $lgin = count($tab_in); 
     58                foreach ( $tab_in as $key => $value ) { 
     59                  if ($value != "nan") {$lgin++;} 
     60                } 
    5961                $percin = $lgin-intval(($lgin*95/100)); 
    60                 $lgout = count($tab_out); 
     62                foreach ( $tab_out as $key2 => $value2 ) { 
     63                  if ($value2 != "nan") {$lgout++;} 
     64                } 
    6165                $percout = $lgout-intval(($lgout*95/100)); 
    62                 $dr1 =  max($tab_in[$percin],$tab_out[$percout]); 
     66                $dr1 =  max($tab_in[$percin-1],$tab_out[$percout-1]); 
    6367                $debit = number_format($dr1*$sampling); 
    6468                `rm $tmp_file`;