スクリプトによるクラスター状態の照会

wsadmin ツールとスクリプトを使用して、クラスター状態を照会することができます。

始める前に

このタスクを開始する前に、wsadmin ツールが稼働している必要があります。 詳しくは、wsadmin スクリプト・クライアントの開始に関するトピックを参照してください。

このタスクについて

以下のステップを実行して、クラスター状態を照会します。

手順

  1. Cluster MBean を識別して cluster 変数に割り当てる。
    • Jacl を使用:
      set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
    • Jython を使用:
      cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*')
      print cluster
    このコマンドは Cluster MBean を戻します。
    出力例:
    WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
  2. クラスターの状態を照会する。
    • Jacl を使用:
      $AdminControl getAttribute $cluster state
    • Jython を使用:
      AdminControl.getAttribute(cluster, 'state')
    このコマンドは、ランタイム状態属性の値を戻します。

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_clusterstate
ファイル名:txml_clusterstate.html