tuakilan has asked for the wisdom of the Perl Monks concerning the following question:
1. read a log file
2. search the logfile.txt for a specific string, in this case the string "TWO"
3. locate records where refs number are identical and time difference is more than 1 hour ( eg record 1 and record 8 )
4. based on the above 3 criteria, create a report file, as how many occourance the scenario happened.
Thanks !2008-Jan-06 00:00:01 UTC (GMT +0000) - Poll: channel = ONE, refs = 595 +166299 2007-Jan-06 00:00:01 UTC (GMT +0000) - Poll: channel = TWO, refs = 595 +159906 2007-Jan-06 00:00:01 UTC (GMT +0000) - Poll: channel = THREE, refs = 6 +59975924 2007-Jan-06 00:00:04 UTC (GMT +0000) - Poll: channel = ONE, refs = 595 +148941 2007-Jan-06 00:00:04 UTC (GMT +0000) - Poll: channel = TWO, refs = 595 +131400 2007-Jan-06 00:00:04 UTC (GMT +0000) - Poll: channel = THREE, refs = 6 +59975924 2007-Jan-06 00:00:04 UTC (GMT +0000) - Poll: channel = ONE, refs = 595 +159906 2007-Jan-06 01:00:05 UTC (GMT +0000) - Poll: channel = ONE, refs = 595 +166299 2007-Jan-06 01:00:06 UTC (GMT +0000) - Poll: channel = TWO, refs = 595 +131400 2007-Jan-06 01:00:06 UTC (GMT +0000) - Poll: channel = TWO, refs = 659 +975924 2007-Jan-06 01:00:07 UTC (GMT +0000) - Poll: channel = THREE, refs = 5 +95148941
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: comb a logfile for time diff and occourance
by svenXY (Deacon) on Feb 18, 2008 at 09:55 UTC | |
Re: comb a logfile for time diff and occourance
by hipowls (Curate) on Feb 18, 2008 at 09:54 UTC | |
by CountZero (Bishop) on Feb 18, 2008 at 10:51 UTC | |
by hipowls (Curate) on Feb 18, 2008 at 11:21 UTC | |
by CountZero (Bishop) on Feb 18, 2008 at 13:25 UTC | |
by Anonymous Monk on Feb 20, 2008 at 03:13 UTC | |
Re: comb a logfile for time diff and occourance
by bruceb3 (Pilgrim) on Feb 18, 2008 at 10:35 UTC | |
Re: comb a logfile for time diff and occourance
by CountZero (Bishop) on Feb 18, 2008 at 10:49 UTC |