Vous êtes sur la page 1sur 3

[pretups@ggnetp36web01: FindLog]cat find_logs.

sh
#!/bin/bash/
echo "Enter MSISDN OR TRANSACTION ID"
read MSISDN
path1=/pretupsvar/SMSCGatewayLogs/access.log
path2=/pretupsvar/SMSCGatewayLogs/smsbox.log
path3=/pretupsvar/pretups_smsrlogs/messageSentLog.log
path4=/pretupsvar/pretups_smsrlogs/channelGatewayRequestLog.log
path5=/pretupsvar/pretups_smsrlogs/EventLog.log
echo "MSISDN/TRANSACTION ID $MSISDN"
rm -rf /pretupshome/NEW/*
echo -e "##################################### ACCESS logs for $MSISDN (##APP1##
) #########################################################\n" >> /pretupshome/N
EW/$MSISDN.txt
ssh pretups@172.18.105.230 grep -a "$MSISDN" $path1 | grep -v "Message Sent to S
MSC" >> /pretupshome/NEW/$MSISDN.txt
echo -e "##################################### SMS BOX logs for $MSISDN (##APP1#
#) #########################################################\n" >> /pretupshome/
NEW/$MSISDN.txt
ssh pretups@172.18.105.230 grep -a "$MSISDN" $path2 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### MESSAGE SENT logs for $MSISDN (##
APP1##) #########################################################\n" >> /pretups
home/NEW/$MSISDN.txt
ssh pretups@172.18.105.230 grep -a "$MSISDN" $path3 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### CHANNEL GATEWAY REQUEST logs for
$MSISDN (##APP1##) #########################################################\n"
>> /pretupshome/NEW/$MSISDN.txt
ssh pretups@172.18.105.230 grep -a "$MSISDN" $path4 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### EVENT logs for $MSISDN (##APP1##)
#########################################################\n" >> /pretupshome/N
EW/$MSISDN.txt
ssh pretups@172.18.105.230 grep -a "$MSISDN" $path5 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### ACCESS logs for $MSISDN (##APP2##
) #########################################################\n" >> /pretupshome/
NEW/$MSISDN.txt
ssh pretups@172.18.105.231 grep -a "$MSISDN" $path1 | grep -v "Message Sent to S
MSC" >> /pretupshome/NEW/$MSISDN.txt
echo -e "##################################### SMS BOX logs for $MSISDN (##APP2#
#) #########################################################\n" >> /pretupshome
/NEW/$MSISDN.txt
ssh pretups@172.18.105.231 grep -a "$MSISDN" $path2 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### MESSAGE SENT logs for $MSISDN (##
APP2##) #########################################################\n" >> /pretup

shome/NEW/$MSISDN.txt
ssh pretups@172.18.105.231 grep -a "$MSISDN" $path3 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### CHANNEL GATEWAY REQUEST logs for
$MSISDN (##APP2##) #########################################################\n"
>> /pretupshome/NEW/$MSISDN.txt
ssh pretups@172.18.105.231 grep -a "$MSISDN" $path4 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### EVENT logs for $MSISDN (##APP2##)
#########################################################\n" >> /pretupshome/N
EW/$MSISDN.txt
ssh pretups@172.18.105.231 grep -a "$MSISDN" $path5 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### ACCESS logs for $MSISDN (##APP3##
) #########################################################\n" >> /pretupshome/
NEW/$MSISDN.txt
ssh pretups@172.18.105.232 grep -a "$MSISDN" $path1 | grep -v "Message Sent to S
MSC" >> /pretupshome/NEW/$MSISDN.txt
echo -e "##################################### SMS BOX logs for $MSISDN (##APP3#
#) #########################################################\n" >> /pretupshome
/NEW/$MSISDN.txt
ssh pretups@172.18.105.232 grep -a "$MSISDN" $path2 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### MESSAGE SENT logs for $MSISDN (##
APP3##) #########################################################\n" >> /pretup
shome/NEW/$MSISDN.txt
ssh pretups@172.18.105.232 grep -a "$MSISDN" $path3 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### CHANNEL GATEWAY REQUEST logs for
$MSISDN (##APP3##) #########################################################\n"
>> /pretupshome/NEW/$MSISDN.txt
ssh pretups@172.18.105.232 grep -a "$MSISDN" $path4 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### EVENT logs for $MSISDN (##APP3##)
#########################################################\n" >> /pretupshome/N
EW/$MSISDN.txt
ssh pretups@172.18.105.232 grep -a "$MSISDN" $path5 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### ACCESS logs for $MSISDN (##APP4##
) #########################################################\n" >> /pretupshome/
NEW/$MSISDN.txt
ssh pretups@172.18.105.234 grep -a "$MSISDN" $path1 | grep -v "Message Sent to S
MSC" >> /pretupshome/NEW/$MSISDN.txt
echo -e "##################################### SMS BOX logs for $MSISDN (##APP4#
#) #########################################################\n" >> /pretupshome
/NEW/$MSISDN.txt
ssh pretups@172.18.105.234 grep -a "$MSISDN" $path2 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### MESSAGE SENT logs for $MSISDN (##

APP4##) #########################################################\n" >> /pretup


shome/NEW/$MSISDN.txt
ssh pretups@172.18.105.234 grep -a "$MSISDN" $path3 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### CHANNEL GATEWAY REQUEST logs for
$MSISDN (##APP4##) #########################################################\n"
>> /pretupshome/NEW/$MSISDN.txt
ssh pretups@172.18.105.234 grep -a "$MSISDN" $path4 >> /pretupshome/NEW/$MSISDN.
txt
echo -e "##################################### EVENT logs for $MSISDN (##APP4##)
#########################################################\n" >> /pretupshome/N
EW/$MSISDN.txt
ssh pretups@172.18.105.234 grep -a "$MSISDN" $path5 >> /pretupshome/NEW/$MSISDN.
txt

Vous aimerez peut-être aussi