From a09d815aaa3555e8efb0c0bf316326d75e7cdef0 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 9 Feb 2007 20:54:56 +0000 Subject: Backport diagnostics, show states which now includes a kill state feature. --- usr/local/www/diag_dump_states.php | 242 +++++++++++++++++++++++-------------- 1 file changed, 153 insertions(+), 89 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 4611812..c13b483 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -1,29 +1,29 @@ - - +"> +

+ + + - - -
- -
-
- - - - - + + + + + +
- - - -
Filter:  - - - - - -
-
- + + + + + +
+ +
+
+ + + + + + + + +
+
+ - - - - + +
ProtoSource -> Router -> DestinationState + + + " /> + +
+
+
+ + + + + + 0) { foreach($states as $line) { - $state_counter++; - if($state_counter > 1000) + if($row >= 1000) break; - + $line_split = preg_split("/\s+/", $line); - $state = array_pop($line_split); - $type = array_shift($line_split); + $type = array_shift($line_split); $proto = array_shift($line_split); - $info = implode(" ", $line_split); - - $towrite = << - - - - -EOD; - print $towrite; + $state = array_pop($line_split); + $info = implode(" ", $line_split); + + /* break up info and extract $srcip and $dstip */ + $ends = preg_split("/\?/", $info); + $parts = split(":", $ends[0]); + $srcip = trim($parts[0]); + $parts = split(":", $ends[count($ends) - 1]); + $dstip = trim($parts[0]); + + echo " + + + + + "; + $row++; } -} else { - print ''; } - +else { + echo " + + "; +} ?> -
Router -> Destination");?>
{$proto}{$info}{$state}
{$proto}{$info}{$state} + +
No states were found.
+ " . gettext("No states were found.") . " +
+
+
- - -
- - - - - + -- cgit v1.1