#!/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.
In reply to Re^2: logfile parsing
by phoneguy
in thread logfile parsing
by phoneguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |