#!/usr/bin/perl # Checks for proactive hits within the past hour use File::ReadBackwards; use POSIX "strftime"; my $success; my $items; my $earliest = POSIX::strftime( "%Y-%m-%d %H:%M:%S", localtime( time() - 60 * 60 ) ); print "$earliest\n"; $bw = File::ReadBackwards->new( '/software/logs/CCASL/ccasl.log' ) or die "can't read '/software/logs/CCASL/ccasl.log' $!" ; while ( defined( my $log_line = $bw->readline() ) ) { last if $log_line lt $earliest; if ($log_line =~ /ProcessHTTPRequestImpl/) { print $log_line; } } #### [root@lpo-tomcat-09 ~]# prohits.pl 2007-07-10 12:17:22 2007-07-10 13:17:05,879 (rocessor23) INFO [ProcessHTTPRequestImpl] CallOut Params: DREREFERENCE:6272332 catTag:10006 caller:rtr2_CAP1_1a warp:true 2007-07-10 13:17:05,750 (rocessor16) INFO [ProcessHTTPRequestImpl] CallOut Params: DREREFERENCE:6272334 catTag:10006 caller:rtp2_CAP3_1a warp:true 2007-07-10 13:17:05,742 (rocessor24) INFO [ProcessHTTPRequestImpl] CallOut Params: DREREFERENCE:6272326 catTag:10006 caller:rtr2_CAP1_1a warp:true 2007-07-10 13:17:05,627 (rocessor16) INFO [ProcessHTTPRequestImpl] CallOut Params: DREREFERENCE:6272259 catTag:10006 caller:rtp2_CAP4_1a warp:true [root@lpo-tomcat-09 ~]#