summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 02:37:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 02:37:42 +0000
commit6a15373346732da98c94239dacbfd2656d9dc3d4 (patch)
treeb6bcfcd17c5eb2ddc0c1a3d9d2a1d623a8fa0abd /etc
parent7617733534e10ed610714121429371fed9a9cfb1 (diff)
downloadpfsense-6a15373346732da98c94239dacbfd2656d9dc3d4.zip
pfsense-6a15373346732da98c94239dacbfd2656d9dc3d4.tar.gz
Add a flag to gather_altq_queue_stats to allow the returning of the root queues
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index d8cc4c5..e7f476d 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -559,7 +559,7 @@ function resync_all_package_configs_bootup($show_message) {
* is queuename|qlength|measured_packets
* NOTE: this commandt takes 5 seconds to run
*/
-function gather_altq_queue_stats() {
+function gather_altq_queue_stats($dont_return_root_queues) {
mwexec("/usr/bin/killall pfctl");
$stats = `/sbin/pfctl -vvsq & sleep 5;killall pfctl 2>/dev/null`;
$stats_array = split("\n", $stats);
@@ -571,8 +571,9 @@ function gather_altq_queue_stats() {
$speed = $match_array[1][0];
if (preg_match_all("/measured:\s+(.*)packets/",$stats_line,$match_array)) {
$measured = $match_array[1][0];
- if(stristr($queue_name,"root_") == false)
- array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}");
+ if($dont_return_root_queues == true)
+ if(stristr($queue_name,"root_") == false)
+ array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}");
}
}
return $queue_stats;
OpenPOWER on IntegriCloud