On Thu, 2 Aug 2007, Robert Felber wrote:
> bzgrep delay: /var/log/mail/maillog* | perl -e '$m=0;$mi=200;while(<>){/
> ([.\d]+)s/; ($m < $1) ? $m = $1: $m=$m; ($1 < $mi) ? $mi = $1 : $mi=$mi;
> $s += $1; $c++} print "max: $m, min: $mi, avg: ".$s/$c."\n"'
>
> gives here:
>
> max: 36, min: 0, avg: 0.411011958077474
When I initially ran your script, the output was:
max: 0106001921251264., min: 0, avg: 20231972.3179855
Which didn't seem quite right 8-/. I modified your regexp to anchor on the
end of line ($), it seemed to match some IP addresses in the middle of the
log line. After that fix, the output was:
max: 90, min: 0, avg: 0.301141423166292
> Besides of that, on 4th Aug I'll start vacation. I don't think it would
> be good to make such deep changes (even if it would be in devel).
Hope you are enjoying your vacation...
--
Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst | [EMAIL PROTECTED]
California State Polytechnic University | Pomona CA 91768
____________________________________________________________
Policyd-weight Mailinglist - http://www.policyd-weight.org/