주 및 보조 엔터프라이즈 관리 서버에서 모든 CA ControlMinder 서비스의 상태를 확인하는 배치 파일을 만드십시오.
참고: 환경에 맞게 스크립트를 사용자 지정하십시오. 예제에서 사용된 종료 코드는 Veritas 설정에 기초합니다. 이 코드에 대한 자세한 내용은 Symantec 지원 웹 사이트를 참조하십시오.
다음은 모든 CA ControlMinder 서비스의 상태를 확인하는 예제입니다.
#!/bin/sh a=1; b=1; c=1; d=1; #CA Control Minder Status check using the Process SEOSD status ps -ef | grep -v grep| grep seosd >/dev/null 2>&1; a=$?; #JCS running status check b=`/etc/init.d/im_jcs status`; if [ "$b" == "jcs is running" ]; then b=0; else b=1; fi #CA ControlMinder Message Queue status check c=`/etc/init.d/ca-acrptmq status` if [ "$c" = "CA ControlMinder Message Queue is running" ]; then c=0; else c=1; fi #JBOSS running status check ps -ef | grep -v grep| grep run.sh >/dev/null 2>&1; d=$? #echo "$a $b $c $d" #To Check the Individual process Status All Zeros Means All Services are up and running and All Ones Means All Services are down #Script status will return '110' when all the services are up and running, will return '100' when all services are down and will return '1' when anyone of the service is down if [ "$a$b$c$d" = "0000" ]; then exit 110 elif [ "$a$b$c$d" = "1111" ]; then exit 100 else exit 1 fi
|
Copyright © 2013 CA.
All rights reserved.
|
|