diff options
author | Ermal <eri@pfsense.org> | 2013-02-19 21:46:47 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-19 21:46:47 +0000 |
commit | ae88de13caaa06f8c614ae6e90800f715b2738b1 (patch) | |
tree | 58a9771939b13d042e3f8cb63f5b87bfa6576257 /usr/local/www/bandwidth_by_ip.php | |
parent | 1cf47c498cff838107f4c171ef5bf15ee828e3bb (diff) | |
download | pfsense-ae88de13caaa06f8c614ae6e90800f715b2738b1.zip pfsense-ae88de13caaa06f8c614ae6e90800f715b2738b1.tar.gz |
Some more code cleanup
Diffstat (limited to 'usr/local/www/bandwidth_by_ip.php')
-rwxr-xr-x | usr/local/www/bandwidth_by_ip.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php index 002d17d..5c46912 100755 --- a/usr/local/www/bandwidth_by_ip.php +++ b/usr/local/www/bandwidth_by_ip.php @@ -35,10 +35,7 @@ if ($sort == "out") else {$sort_method = "-R";} -exec("/usr/local/bin/rate -i {$real_interface} -nlq 1 -Aba 20 {$sort_method} -c {$intsubnet} | tr \"|\" \" \" | awk '{ printf \"%s:%s:%s:%s:%s\\n\", $1, $2, $4, $6, $8 }'", $listedIPs); -unset($bandwidthinfo); -unset($receivebytesarray); -unset($transmitbytesarray); +$_grb = exec("/usr/local/bin/rate -i {$real_interface} -nlq 1 -Aba 20 {$sort_method} -c {$intsubnet} | tr \"|\" \" \" | awk '{ printf \"%s:%s:%s:%s:%s\\n\", $1, $2, $4, $6, $8 }'", $listedIPs); $someinfo = false; for ($x=2; $x<12; $x++){ @@ -56,6 +53,8 @@ for ($x=2; $x<12; $x++){ $someinfo = true; } } +unset($bandwidthinfo, $_grb); +unset($listedIPs); //no bandwidth usage found if ($someinfo == false) |