0% found this document useful (0 votes)
77 views

Check Networker Server

This script checks the status of a backup server and notifies appropriate contacts if it is unreachable or not responding. It first checks the current time and limits manual runs to every 25 or 55 minutes. It then attempts to contact the server, waits 60 seconds and retries if no response before triggering an alert email with details.

Uploaded by

puneetgoyal100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Check Networker Server

This script checks the status of a backup server and notifies appropriate contacts if it is unreachable or not responding. It first checks the current time and limits manual runs to every 25 or 55 minutes. It then attempts to contact the server, waits 60 seconds and retries if no response before triggering an alert email with details.

Uploaded by

puneetgoyal100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#!

/bin/ksh
# set -x
. /nsr/scripts/.profile

CURRENT_TIME_EPOCH=`date +%s`
CURRENTHOUR=`date +"%H"`
CURRENTMINUTE=`date +"%M"`
if [ $1 ] && [ $1 = NO_MANUAL_RUN ] && [ $CURRENTMINUTE = 25 ] || [ $CURRENTMINUTE
= 55 ]
then
echo "Proceeding..." >/dev/null
else
echo "Exiting...Running this script manually is prohibited"
exit
fi

ls /nsr/scripts/.lock_check* >> /dev/null 2>&1


if [ $? = 0 ]
then
echo "nsradmin error : Cannot Contact Backup Server MV3WBKSV01PRV. Appears
that backup server is Hung or Down. Please check status manually and investigate if
there is an issue." | /bin/mailx -s "mv3wbksv01prv.smrc.sidra.org's ATWE
notification,Hostname: mv3wbksv01prv, Profile: Custom, Severity: 2"
mwahajuddin@sidra.org,mhouhou@sidra.org,sawad@sidra.org,ptummala.dell@sidra.org,pra
veen_tummala@dellteam.com,Arvind_K_Soni@Dell.com,Animesh_Kumar@Dell.com,Sandeep_Bat
ra@Dell.com,dl-sidra-backup@dell.com,atwe_sid_networker@dell.com -- -f
networker@sidra.org
exit
else
touch /nsr/scripts/.lock_check
chmod 600 /nsr/scripts/.lock_check
fi
trap "rm /nsr/scripts/.lock_check;echo interrupted...;exit" 2

echo help | nsradmin -s mv3wbksv01prv-prod.smrc.sidra.org -i - >/dev/null 2>&1


if [ $? -eq 0 ]
then
logger "nsradmin notice : Backup Server MV3WBKSV01PRV is alive"
else
sleep 60
echo help | nsradmin -s mv3wbksv01prv.smrc.sidra.org -i - >/dev/null 2>&1
if [ $? -eq 0 ]
then
logger "nsradmin notice : Backup Server MV3WBKSV01PRV is alive"
else
logger "nsradmin notice : Backup Server MV3WBKSV01PRV is not responding"
echo "nsradmin error : Cannot Contact Backup Server MV3WBKSV01PRV. Appears
that backup server is Hung or Down. Please check status manually and investigate if
there is an issue." | /bin/mailx -s "mv3wbksv01prv.smrc.sidra.org's ATWE
notification,Hostname: mv3wbksv01prv, Profile: Custom, Severity: 2"
mwahajuddin@sidra.org,mhouhou@sidra.org,sawad@sidra.org,ptummala.dell@sidra.org,pra
veen_tummala@dellteam.com,Arvind_K_Soni@Dell.com,Animesh_Kumar@Dell.com,Sandeep_Bat
ra@Dell.com,dl-sidra-backup@dell.com,atwe_sid_networker@dell.com -- -f
networker@sidra.org
fi
fi

rm /nsr/scripts/.lock_check

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy