Advertisement
Guest User

Untitled

a guest
Jun 1st, 2017
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. #!/bin/ksh
  2. #
  3. #=======================================================================
  4. #
  5. # Script: mon_oiws
  6. #
  7. # Purpose: Verify the OiWS is active.
  8. # If inactive, acivate.
  9. # If still inactive, generate page.
  10. ## Parms: None.
  11. #
  12. #
  13. usage="$0"
  14. #
  15. #=======================================================================
  16. #
  17.  
  18. OiWSrtida10180=`echo "\iv963m" |telnet 32.84.115.205 80`
  19. OiWSrtida101443=`echo "\iv963m" |telnet 32.84.115.205 443`
  20. OiWSrcipa10280=`echo "\iv963m" |telnet 32.84.58.40 80` OiWSrcipa10380=`echo "\iv963m" |telnet rcipa103.ims.att.com 80`
  21. OiWSrcipa103443=`echo "\iv963m" |telnet rcipa103.ims.att.com 443`
  22. OiWSrcipa20380=`echo "\iv963m" |telnet rcipa203.ims.att.com 80`
  23. OiWSrcipa203443=`echo "\iv963m" |telnet rcipa203.ims.att.com 443`
  24.  
  25. rc=0
  26. oiwsdate=`date +'%d/%m/%Y %T'`
  27.  
  28. #rtida101
  29. if [ -n `echo $OiWSrtida10180 |grep "Connection closed"` ];
  30. then echo "Connected 32.84.115.205:80"
  31. else
  32. echo OiWSan attempted connect operation 32.84.115.205:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  33. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  34.  
  35. fi
  36.  
  37. if [ -n `echo $OiWSrtida101443 |grep "Connection closed"` ];
  38. then
  39. echo "Connected 32.84.115.205:443"
  40. else
  41. echo Could not connect 32.84.115.205:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  42. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  43.  
  44. fi
  45.  
  46. #rcipa102
  47.  
  48. if [ -n `echo $OiWSrcipa10280 |grep "Connection closed"` ];
  49. then
  50. echo "Connected 32.84.58.40:80"
  51. else
  52. echo Could not connect 32.84.58.40:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  53. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  54.  
  55. fi
  56.  
  57. #rcipa103
  58.  
  59. if [ -n `echo $OiWSrcipa10380 |grep "Connection closed"` ];
  60. then
  61. echo "Connected rcipa103.ims.att.com:80"
  62. else
  63. echo Could not connect rcipa103.ims.att.com:80 | mail -s "$(hostname) OiWS is not running" igorim@icloud.com
  64. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  65.  
  66. fi
  67.  
  68. if [ -n `echo $OiWSrcipa103443 |grep "Connection closed"` ];
  69. then
  70. echo "Connected rcipa103.ims.att.com:443"
  71. else
  72. echo Could not connect rcipa103.ims.att.com:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  73. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  74.  
  75. fi
  76.  
  77. #rcipa203
  78.  
  79. if [ -n `echo $OiWSrcipa20380 |grep "Connection closed"` ];
  80. then
  81. echo "Connected rcipa203.ims.att.com:80"
  82. else
  83. echo Could not connect 32.84.115.205:80 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  84. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  85.  
  86. fi
  87.  
  88. if [ -n `echo $OiWSrcipa203443 |grep "Connection closed"` ];
  89. then
  90. echo "Connected rcipa203.ims.att.com:443"
  91. else
  92. echo Could not connect 32.84.115.205:443 | mail -s "$(hostname) OiWS is not running" igor@icloud.com
  93. echo $oiwsdate $(hostname) SNA is NOT working properly. > /tmp/sna.log
  94.  
  95. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement