From ef021ff780bfae0d0188a051a0d284a33c7340c7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 13 May 2010 19:32:49 +0000 Subject: [PATCH] Use full path to rate and pass -b option to show the speeds in bits/s rather than byte/s in conformance with the traffic graph metric which is bits/s. --- usr/local/www/bandwidth_by_ip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php index b85db4ff8a..e2d2417049 100755 --- a/usr/local/www/bandwidth_by_ip.php +++ b/usr/local/www/bandwidth_by_ip.php @@ -30,7 +30,7 @@ $intip = explode (".", $intip); //use class A subnet to make sure we capture all traffic on specified interface $intsubnet = $intip[0] . ".0.0.0/8"; -exec("rate -i {$real_interface} -nlq 1 -Aa 10 -c {$intsubnet} | awk '{ printf \"%s:%s:%s:%s:%s\\n\", $1, $2, $5, $8, $11 }'", $listedIPs); +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); unset($bandwidthinfo); unset($receivebytesarray);