summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 04:00:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 04:00:16 +0000
commite90bc39f6b6b47f058c71605747d577b5381239d (patch)
treeadb515834891e350c6a7a99e22abd77a19801eb0 /etc
parent8563e5dec895e27103fb4cffe6b1245d5e67de71 (diff)
downloadpfsense-e90bc39f6b6b47f058c71605747d577b5381239d.zip
pfsense-e90bc39f6b6b47f058c71605747d577b5381239d.tar.gz
Kill any running pfctl before extracting stats
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index e7f476d..e3d547e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -560,7 +560,7 @@ function resync_all_package_configs_bootup($show_message) {
* NOTE: this commandt takes 5 seconds to run
*/
function gather_altq_queue_stats($dont_return_root_queues) {
- mwexec("/usr/bin/killall pfctl");
+ mwexec("/usr/bin/killall -9 pfctl");
$stats = `/sbin/pfctl -vvsq & sleep 5;killall pfctl 2>/dev/null`;
$stats_array = split("\n", $stats);
$queue_stats = array();
@@ -569,11 +569,13 @@ function gather_altq_queue_stats($dont_return_root_queues) {
$queue_name = $match_array[1][0];
if (preg_match_all("/measured:\s+.*packets\/s\,\s(.*)\s+\]/",$stats_line,$match_array))
$speed = $match_array[1][0];
+ if (preg_match_all("/borrows:\s+(.*)/",$stats_line,$match_array))
+ $borrows = $match_array[1][0];
if (preg_match_all("/measured:\s+(.*)packets/",$stats_line,$match_array)) {
$measured = $match_array[1][0];
if($dont_return_root_queues == true)
if(stristr($queue_name,"root_") == false)
- array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}");
+ array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}|{$borrows}");
}
}
return $queue_stats;
OpenPOWER on IntegriCloud