プライマリおよびセカンダリ エンタープライズ管理サーバ上のすべての CA ControlMinder サービスのステータスを確認するバッチ ファイルを作成します。
注: 要件に基づいてスクリプトをカスタマイズします。 例で使用される終了コードは Veritas セットアップに基づいています。コードの詳細については、Symantec サポート Web サイトを参照してください。
すべての CA ControlMinder Services に対してステータスを確認する例を以下に示します。
#!/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.
|
|