Tue Oct 13 00:00:01 2015|1008|959788857688|123580|Tue Oct 13 00:00:01 2015|Tue Oct 13 00:00:01 2015|CMT|Undelivered|none|Submit|0|SMSC_PR_LC_SMSC_InvalidDestAddress|GSM|INVALID|16 Bit|140|140|no||no|no||1/2|No|NO|no|no|0|1|0|0||959790000028||8|0||0|no|no|default_billing|-1|0|no|no|1|1|1|1|0|1|0|0|||||Wed Oct 14 00:00:01 2015|SR|||IV|011809614446710010008|||0|0||0|0||0||||123580||||||||||||||||||
####
SMSCDR_PREPAY_151013000000_10.84.0.29_AS.log (From 00:00:01 to 00:10:00)
SMSCDR_PREPAY_151013100000_10.84.0.29_AS.log (From 00:10:01 to 00:20:00)
SMSCDR_PREPAY_151013200000_10.84.0.29_AS.log
SMSCDR_PREPAY_151013300000_10.84.0.29_AS.log
SMSCDR_PREPAY_151013400000_10.84.0.29_AS.log
SMSCDR_PREPAY_151013500000_10.84.0.29_AS.log (From 00:50:01 to 01:00:00)
####
00:10:00= 0 0
00:10:01= 158 158
00:10:02= 163 321
00:10:03= 214 535
00:10:04= 123 658
00:10:05= 174 832
00:10:06= 271 1103
00:10:07= 96 1199
00:10:08= 263 1462
00:10:09= 72 1534
00:10:10= 190 1724
####
my @low_sec = ("00","01","02","03","04","05","06","07","08","09");
my @high_sec = (10 .. 59);
my @seconds = (@low_sec,@high_sec);
my $greatest = 0;
my $total = 0;
foreach my $min ($minute .. $minute+9)
{
foreach my $sec (@seconds)
{
my $SMPP_count = int ((split (/\s+/,`cut -d "|" -f 1,10,13 SMSCDR*$date$hour$minute*.log |grep "Submit|GSM" |grep "$hour:$min:$sec" |sort |uniq -c`)) [1]) + int ((split (/\s+/,`cut -d "|" -f 1,10,13 SMSCDR*$date$hour$minute*.log |grep "Submit|SMPP" |grep "$hour:$min:$sec" |sort |uniq -c`)) [1]);
if ($SMPP_count > $greatest)
{
$greatest = $SMPP_count;
}
$total = $total + $SMPP_count;
print "$hour:$min:$sec","= $SMPP_count","\t",$total,$/;
}
}
print $greatest,$/;