DIR : /home/kozerus/public_html/dgs/scripts/analyze-weblogs/filter-rtime.pl

/home/kozerus/public_html/dgs/scripts/analyze-weblogs

#!/usr/bin/perl
# usage: $0 min-rtime max-rtime|- <IN
# input: "YYYY-MM-DD hh:mm:ss url status size response_time_micros"

#use strict;

my ($date, $time, $url, $status, $size, $rtime);

my $min = shift or die "Missing min-response-time\n";
my $max = shift || '-';
$max = 0 if $max eq '-';

while (<>) {
   chomp;
   if (@fields = split /\s/)
   {
      # ($date, $time, $url, $status, $size, $rtime) = @fields;
      $rtime = $fields[5];

      print "$_\n" if $rtime >= $min && ( $max <=0 || ( $rtime < $max ) );
   }
}

exit 0;

//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer