in reply to Re: logfile parsing
in thread logfile parsing
#!/usr/bin/perl -w use strict; my $processid; my $duration; my $ismatched; my $count; my $line; my $fo; my $filename; my $id; my $durid open(FO, $filename); while (defined ($line = <FO>)) { # Start if ($line =~ m/Start$/) { $count++; # Grab text from ID $processid =~ m/Id\:/; $ismatched[$processid] = 0; } if ($line =~ m/End$/ { $count--; $processid =~ m/ID:/; $ismatched[$processid] =1; $duration[$processid] =~ m/duration:/; if($duration > 300) { print "Look at Id: $processid -- took longer than it shoul +d.\n"; } } } # finding out processes need to go here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: logfile parsing
by ptum (Priest) on Oct 26, 2006 at 16:51 UTC | |
by phoneguy (Novice) on Oct 26, 2006 at 17:42 UTC | |
|
Re^3: logfile parsing
by phoneguy (Novice) on Oct 26, 2006 at 16:57 UTC |