Bootstrap FreeKB - IBM WebSphere - List Clusters using wsadmin
IBM WebSphere - List Clusters using wsadmin

Updated:   |  IBM WebSphere articles

If you are not familiar with wsadmin.sh (Linux) / wsadmin.bat (Windows), check out my article Getting Started with wsadmin.

Here is an example of how to list your clusters.

~]$ /opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminClusterManagement.listClusters()"
WASX7209I: Connected to process "dmgr" on node your_node using SOAP connector;  The type of process is: DeploymentManager
---------------------------------------------------------------
 AdminClusterManagement: List server clusters
 Usage: AdminClusterManagement.listClusters()
 Return: List of the clusters in the cell.
---------------------------------------------------------------
 
 
cluster is found: Cluster01(cells/Cell01/clusters/Cluster01|cluster.xml#ServerCluster_1234567890127)
['Cluster01(cells/Cell01/clusters/Cluster01|cluster.xml#ServerCluster_1234567890127)']

 

If you have more than one cluster, and you want to determine the cluster that a particular WebSphere Application Server is in, AdminApp.listModules can be used.

/opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.listModules('AppSrv01', '-server')"

 

You can then list the Cluster Members, the application servers (aka JVMs) in the cluster.

[john.doe@localhost ~]$ /opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminClusterManagement.listClusterMembers('Cluster01')"
WASX7209I: Connected to process "dmgr" on node your_node using SOAP connector;  The type of process is: DeploymentManager
---------------------------------------------------------------
 AdminClusterManagement:         List server cluster members
 Cluster name:                   Cluster01
 Usage: AdminClusterManagement.listClusterMembers("Cluster01")
 Return: List of the cluster members in the specified cluster.
---------------------------------------------------------------
 
 
[foo, bar]

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter a9a3b1 in the box below so that we can be sure you are a human.