Script to obtain the count of archive logs applied during recovery

Pass the start date + time and end date + time to the following script. It looks at the alert log file and obtains the no of archive logs that have been applied during media recovery in that time interval.
#!/usr/bin/perl -w

BEGIN { push @INC,”/home/user/TimeDate-1.16/lib/” }
use Date::Parse;
$start=str2time(@ARGV[0]);
chomp(@ARGV[1]);
$end=str2time(@ARGV[1]);

$log=’path to the log file’;
open(ALERTLOGFILE,$log) or die “Not able to [...]

Transforming Unix Timestamps in logs to date

Logfiles in older unix systems and monitoring systems just log the unix timestamp as the first field in the enteries. When we try to pull out data for a particular date, then it becomes tricky. The following code snippet will help pulling out data for a particular date quite easily
cat <logfile> | perl -lane ‘$_=$F[0]; [...]