Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/ksh
- #
- #=======================================================================
- #
- # Script: mon_oiws
- #
- # Purpose: Verify the OiWS is active.
- # If inactive, acivate.
- # If still inactive, generate page.
- ## Parms: None.
- #
- #
- usage="$0"
- #
- #=======================================================================
- #
- OiWSrtida10180=`echo "\iv963m" |telnet 32.84.115.205 80`
- OiWSrtida101443=`echo "\iv963m" |telnet 32.84.115.205 443`
- OiWSrcipa10280=`echo "\iv963m" |telnet 32.84.58.40 80` OiWSrcipa10380=`echo "\iv963m" |telnet rcipa103.ims.att.com 80`
- OiWSrcipa103443=`echo "\iv963m" |telnet rcipa103.ims.att.com 443`
- OiWSrcipa20380=`echo "\iv963m" |telnet rcipa203.ims.att.com 80`
- OiWSrcipa203443=`echo "\iv963m" |telnet rcipa203.ims.att.com 443`
- rc=0
- oiwsdate=`date +'%d/%m/%Y %T'`
- #rtida101
- if [ -n `echo $OiWSrtida10180 |grep "Connection closed"` ];
- then echo "Connected 32.84.115.205:80"
- else
- echo OiWSan attempted connect operation 32.84.115.205:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- if [ -n `echo $OiWSrtida101443 |grep "Connection closed"` ];
- then
- echo "Connected 32.84.115.205:443"
- else
- echo Could not connect 32.84.115.205:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- #rcipa102
- if [ -n `echo $OiWSrcipa10280 |grep "Connection closed"` ];
- then
- echo "Connected 32.84.58.40:80"
- else
- echo Could not connect 32.84.58.40:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- #rcipa103
- if [ -n `echo $OiWSrcipa10380 |grep "Connection closed"` ];
- then
- echo "Connected rcipa103.ims.att.com:80"
- else
- echo Could not connect rcipa103.ims.att.com:80 | mail -s "$(hostname) OiWS is not running" igorim@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- if [ -n `echo $OiWSrcipa103443 |grep "Connection closed"` ];
- then
- echo "Connected rcipa103.ims.att.com:443"
- else
- echo Could not connect rcipa103.ims.att.com:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- #rcipa203
- if [ -n `echo $OiWSrcipa20380 |grep "Connection closed"` ];
- then
- echo "Connected rcipa203.ims.att.com:80"
- else
- echo Could not connect 32.84.115.205:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
- if [ -n `echo $OiWSrcipa203443 |grep "Connection closed"` ];
- then
- echo "Connected rcipa203.ims.att.com:443"
- else
- echo Could not connect 32.84.115.205:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
- echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement