Querying cluster state using scripting

You can query cluster states using the wsadmin tool and scripting.

Before you begin

Before starting this task, the wsadmin tool must be running. See the topic about starting the wsadmin scripting client using wsadmin scripting for more information.

About this task

Perform the following steps to query cluster state:

Procedure

  1. Identify the Cluster MBean and assign it to the cluster variable.
    • Using Jacl:
      set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
    • Using Jython:
      cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*')
      print cluster
    This command returns the Cluster MBean.
    Example output:
    WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
  2. Query the cluster state.
    • Using Jacl:
      $AdminControl getAttribute $cluster state
    • Using Jython:
      AdminControl.getAttribute(cluster, 'state')
    This command returns the value of the run-time state attribute.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 22, 2010 12:21:29 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-zos&topic=txml_clusterstate
File name: txml_clusterstate.html