diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-07 02:02:48 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-07 02:02:48 +0000 |
commit | 04e6e7b7e9537bcc0b42b80ac015bacbb0a50a5b (patch) | |
tree | 4982949a5037973a8e75bbbcf4a500616166a271 | |
parent | 81ae6cb05e9dc1e709cbd5c474494bec04270515 (diff) | |
download | pfsense-04e6e7b7e9537bcc0b42b80ac015bacbb0a50a5b.zip pfsense-04e6e7b7e9537bcc0b42b80ac015bacbb0a50a5b.tar.gz |
Add dropped packet stats
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 | ||||
-rwxr-xr-x | usr/local/www/status_queues.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 4ab4314..332e035 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -587,11 +587,13 @@ function gather_altq_queue_stats($dont_return_root_queues) { $borrows = $match_array[1][0]; if (preg_match_all("/suspends:\s+(.*)/",$stats_line,$match_array)) $suspends = $match_array[1][0]; + if (preg_match_all("/dropped pkts:\s+(.*)/",$stats_line,$match_array)) + $drops = $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}|{$suspends}"); + array_push($queue_stats, "{$queue_name}|{$speed}|{$measured}|{$borrows}|{$suspends}|${drops}"); } } return $queue_stats; diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 67bc442..7c2234e 100755 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -112,6 +112,7 @@ While(!Connection_Aborted()) { $speed = $stat_line_split[1]; $borrows = intval($stat_line_split[3]); $suspends = intval($stat_line_split[4]); + $drops = intval($stat_line_split[5]); echo "<script language='javascript'>\n"; @@ -120,7 +121,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 = ""; - $borrows_txt = " - {$borrows} borrows - {$suspends} suspends"; + $borrows_txt = " - {$borrows} borrows - {$suspends} suspends - ${drops} drops"; echo "document.forms[0].queue{$i}meter.value = '" . $packet_sampled . "/pps - " . $speed . "{$borrows_txt}';\n"; echo "</script>\n"; $i++; |