From f1aad4d1ad04214382ba577360732ae581c51264 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 15 Oct 2010 13:42:08 +0000 Subject: Resolves #879. Commit patch referenced in ticket to properly parse rate output. --- usr/local/www/bandwidth_by_ip.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'usr') diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php index 744a2b0..71e4c27 100755 --- a/usr/local/www/bandwidth_by_ip.php +++ b/usr/local/www/bandwidth_by_ip.php @@ -3,10 +3,6 @@ * To change this template, choose Tools | Templates * and open the template in the editor. * - * - * - * - * */ /* @@ -30,7 +26,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("/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); +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); unset($bandwidthinfo); unset($receivebytesarray); @@ -53,7 +49,6 @@ for ($x=2; $x<12; $x++){ } } - //no bandwidth usage found if ($someinfo == false) echo gettext("no info"); -- cgit v1.1