About Me

My photo
Working as Technical Lead in CollabNET software private limited.

Thursday, 25 September 2008

PERL script for extracting log file based on time

Below code extracts the huge log file based on time frame passed.


#!/usr/bin/perl

use strict;

my $file;
my $times = 0;
my $needed_response_time = 0;
my $start;
my $end;

sub Usage
{
my ($msg) = $_[0];
if ($msg)
{
print STDERR "$msg \n";
}
print STDERR << "EOHELP"
Usage: split_access_log_by_time

options:

-t - :: time interval for which the log is needed
-g

No comments: