while(<>){ chop; if (/^node=(\S+).*audit\((\d+\....):(\d+)\)/){ if (! $time{$2}{$1}{$3}){ $time{$2}{$1}{$3}=1; } if (/^node=(\S+) type=EOE msg=audit\((\d+\....):(\d+)\)/){ print_data($1,$2,$3); $totalevents++; }else{ push(@{$data{$1}{"$2:$3"}},$_); } } $cnt++; if ($cnt > $agecheck){ # see if entries have aged off and should be written out $date=&dateonly; while (my ($t)=each(%time)){ if ($t < (time() - $age)){ foreach my $host (keys(%{$time{$t}})){ foreach my $event (keys(%{$time{$t}{$host}})){ logit("Aged: node=$host $t:$event"); print_data($host,$t,$event); update_stats(); } } } } $cnt=0; } $totallines++; }