Bootstrap FreeKB - IBM WebSphere - List Cluster Members using wsadmin
IBM WebSphere - List Cluster Members 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 using wsadmin.

~]$ /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_1699955548167)
['Cluster01(cells/Cell01/clusters/Cluster01|cluster.xml#ServerCluster_1699955548167)']

 

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

[webproc@DLLBWAS-1-0001 ~]$ /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.
---------------------------------------------------------------
 
cluster Cluster01 has 2 members
Cluster member: AppSrv01
Cluster member: AppSrv02
['AppSrv01(cells/Cell01/clusters/Cluster01 |cluster.xml#ClusterMember_1400684326107)','AppSrv02(cells/Cell01/clusters/Cluster01 |cluster.xml#ClusterMember_1400684326108)']

 




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 4ed5d7 in the box below so that we can be sure you are a human.