Project

General

Profile

Bug #879 » bandwidth_by_ip.patch

Torben Hørup, 09/07/2010 04:53 AM

View differences:

/usr/local/www/bandwidth_by_ip.php 2010-09-06 17:50:18.000000000 +0200
30 30
//use class A subnet to make sure we capture all traffic on specified interface
31 31
$intsubnet = $intip[0] . ".0.0.0/8";
32 32

  
33
exec("/usr/local/bin/rate -i {$real_interface} -nlq 1 -Aba 20 -c {$intsubnet} | awk '{ printf \"%s:%s:%s:%s:%s\\n\", $1,  $2,  $5,  $8,  $11 }'", $listedIPs);
33
exec("/usr/local/bin/rate -i {$real_interface} -nlq 1 -Aba 20 -c {$intsubnet} | tr \"|\" \" \" | awk '{ printf \"%s:%s:%s:%s:%s\\n\", $1,  $2,  $4,  $6,  $8 }'", $listedIPs);
34 34

  
35 35
unset($bandwidthinfo);
36 36
unset($receivebytesarray);
    (1-1/1)