diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-07 01:37:45 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-07 01:37:45 +0000 |
commit | 4bed294c79f03dbc9e79f6b1a69c3fbe27d4f07b (patch) | |
tree | 3136f17a089f5d2ab8eb9a5f1bb4a9da6b083c4c | |
parent | 05eefaceda9752c29de06e44a62fdc01f150cecf (diff) | |
download | pfsense-4bed294c79f03dbc9e79f6b1a69c3fbe27d4f07b.zip pfsense-4bed294c79f03dbc9e79f6b1a69c3fbe27d4f07b.tar.gz |
add suspend stats
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 | ||||
-rwxr-xr-x | usr/local/www/status_queues.php | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index dc2789d..4ab4314 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -585,11 +585,13 @@ function gather_altq_queue_stats($dont_return_root_queues) { $speed = $match_array[1][0]; if (preg_match_all("/borrows:\s+(.*)/",$stats_line,$match_array)) $borrows = $match_array[1][0]; + if (preg_match_all("/suspends:\s+(.*)/",$stats_line,$match_array)) + $suspends = $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}|{$borrows}"); + array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}|{$borrows}|{$suspends}"); } } return $queue_stats; diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 7842ae9..ea11967 100755 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -54,7 +54,7 @@ $a_queues = &$config['shaper']['queue']; <form action="status_queues.php" method="post"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td class="listhdr">Name</td> + <td class="listhdr">Queue Stats</td> </tr> <?php $i = 0; foreach ($a_queues as $queue): ?> <tr valign="top"> @@ -111,6 +111,7 @@ While(!Connection_Aborted()) { $packet_sampled = intval($stat_line_split[2]); $speed = $stat_line_split[1]; $borrows = intval($stat_line_split[3]); + $suspends = intval($stat_line_split[4]); echo "<script language='javascript'>\n"; @@ -119,8 +120,7 @@ While(!Connection_Aborted()) { echo "document.queue{$i}widthb.style.width='{$packet_s}';\n"; echo "document.queue{$i}widtha.style.width='" . (400 - $packet_s) . "';\n"; $borrows_txt = ""; - if(intval($borrows > 0)) - $borrows_txt = " - {$borrows} borrows"; + $borrows_txt = " - {$borrows} borrows - {$suspends} suspends"; echo "document.forms[0].queue{$i}meter.value = '" . $packet_sampled . "/pps - " . $speed . "{$borrows_txt}';\n"; echo "</script>\n"; $i++; |