summaryrefslogtreecommitdiffstats
path: root/usr/local/www/bandwidth_by_ip.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-10-15 13:42:08 +0000
committerErmal <eri@pfsense.org>2010-10-15 13:42:08 +0000
commitf1aad4d1ad04214382ba577360732ae581c51264 (patch)
tree7780a579a37d1fb7a866be390ae56877f4baf7c5 /usr/local/www/bandwidth_by_ip.php
parent2c794549afddcf37947f0e4da5f1b8686f6068fc (diff)
downloadpfsense-f1aad4d1ad04214382ba577360732ae581c51264.zip
pfsense-f1aad4d1ad04214382ba577360732ae581c51264.tar.gz
Resolves #879. Commit patch referenced in ticket to properly parse rate output.
Diffstat (limited to 'usr/local/www/bandwidth_by_ip.php')
-rwxr-xr-xusr/local/www/bandwidth_by_ip.php7
1 files changed, 1 insertions, 6 deletions
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");
OpenPOWER on IntegriCloud