On Wed, 29 Oct 2003, Gilles LAMIRAL wrote: > Hello Erik > > > The inlined patch is useful to avoid breaking "alertevery" with changing > > summaries all the time because of timing information in the summary. > > When you change the API of a monitor, you should change it > via an option, since some people use this feature for a long > time. > Less noise for you, less feature for others :-)
Bah, all right, you're the boss on phttp.monitor. :) Updated patch inlined. Use --nts option to turn off timing in summaries. Jim, please apply this one instead. Index: phttp.monitor =================================================================== RCS file: /home/erik/.cvs/mon/mon.d/phttp.monitor,v retrieving revision 1.8 retrieving revision 1.10 diff -u -r1.8 -r1.10 --- phttp.monitor 2003/10/28 16:00:08 1.8 +++ phttp.monitor 2003/10/30 10:43:41 1.10 @@ -116,7 +116,7 @@ my( $port, $request, $nbrequests, $inserthost, - $timeout, $softimeout, $regex); + $timeout, $softimeout, $regex, $nts); getoptions(); usage(), exit(0) if ($help); @@ -338,6 +338,7 @@ "port=i" => \$port, + "nts" => \$nts, "nbrequests=i" => \$nbrequests, "request=s" => \$request, "inserthost!" => \$inserthost, @@ -429,6 +430,8 @@ soft timeout is reached but the test will fail. default is <--timeout> + --nts : no timing in summaries + --regex <string> : regular expression to match for a good http response. default is : ^HTTP/([\\d\\.]+)\\s+200\\b @@ -726,27 +729,23 @@ || $::a <=> $::b } keys(%badrace)) { - push(@summary, - "$client{$id}{'host'}" - . "(" - . int($client{$id}{'end'} - $client{$id}{'begin'} + 0.5) - . ")" - ) - ; + if ($nts) + { + push(@summary, + "$client{$id}{'host'}" + ); + }else{ + push(@summary, + "$client{$id}{'host'}" + . "(" + . int($client{$id}{'end'} - $client{$id}{'begin'} + 0.5) + . ")" + ); + } } print join (" ", @summary), "\n" x 1; return; - # The first I wrote (it works, of course) - # the sorting is alphabetic - print join (" ", sort map { - "$client{$_}{'host'}" - . "(" - . int($client{$_}{'end'} - $client{$_}{'begin'} + 0.5) - . ")" - } keys(%badrace)), - "\n" x 2; - } sub details { -- Erik I. Bolsų, Triangel Software AS | Skybert AS Tlf: 712 41 694 Mobil: 915 79 512 _______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon