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:
- 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 clusterThis command returns the Cluster MBean.
For example...
WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1- Query the cluster state.
- Jacl...
$AdminControl getAttribute $cluster state- Jython...
AdminControl.getAttribute(cluster, 'state')This command returns the value of the run-time state attribute.
Related tasks
Use AdminControl for scripted administration
Related
Commands for AdminControl