sub run { my ($self) = shift; my $args = $self->{args}; my $post_method = 'POST'; my $get_method = 'GET .*=(htt|ft|ph)p(:|%3[aA])(/|%2[fF])'; my $method_string = qq!"($post_method |$get_method)!; if ( defined($args->{method}) && @{$args->{method}}==1 ) { if (lc($args->{method}->[0]) eq 'post') { $method_string = qq!"$post_method!; } elsif (lc($args->{method}->[0]) eq 'get') { $method_string = qq!"($get_method)!; } } my $command = qq!find $args->{docroot}/logs/ -maxdepth 1 -type f -name access.log\* | xargs -r -n1 -P10 /bin/zgrep -E '$method_string.* HTTP/[0-9]\.[0-9]" [23][0-9]{2}'!; open FH, "-|", $command; local $/; my $output=; close FH; return $output; }