Querying cluster state using scripting


We can query cluster states using wsadmin and scripting.

Before starting this task, wsadmin must be running. See the Start wsadmin article for more information.

Perform the following steps to query cluster state:

 

  1. Identify the Cluster MBean and assign it to the cluster variable.

    • Jacl...

      set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
    • Jython...

      cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*') print cluster

    This command returns the Cluster MBean.

    For example...

    WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1

  2. Query the cluster state.

    This command returns the value of the run-time state attribute.

 

Related tasks


Use AdminControl for scripted administration

 

Related


Commands for AdminControl