s0864|2003/04/14 00:00:41.136|MWP6|SeFraleidssV2 | 0.038|0000| |OH| |10.1.2.3 |807D|10183312 |1018331 2| | |20| |PR84|P2AP|B01P|NNN|C21209 | | | | |00473 63|1419680| |A|ABCD #### $totalsentrycalls=0; keys %count_by_sentry_server = 10; keys %count_by_ip = 10000; keys %count_by_api = 500; keys %count_by_api_exec = 500; while (sysread(INFILE, $buffer,16384,length $buffer)) { while ($buffer =~ m/(.+?)\|(.*)\n/g) { $totalsentrycalls++; $count_by_sentry_server{$0}++; $count_by_ip{$9}++; $count_by_api{$3}++; $count_by_api_exec{$3}{$totalsentrycalls}=$4; if ($31 =~ /^[A-Z]+/) { $hosts{$17}{$31}{$18}++; } else { if ($18 =~ /^[A-Z]+/) { $hosts{$17}{AORDIRECT}{$18}++; } else { $hosts{$17}{DB2}{LOCAL}++; } } } $buffer=substr($buffer, rindex($buffer, "\n")); print "$totalsentrycalls\n"; }