Example: Migrating - Listing the running server groups
The following examples demonstrate how to list running server groups in the WebSphere Application Server V4.0 and V5.0:
- wscp V4.0
set groups [ServerGroups list] foreach sgroup $groups { set thestate [ServerGroup show $sgroup -attribute {Name CurrentState} puts $thestate }- wsadmin V5.0
set clusters [$AdminControl queryNames type=Cluster,*] foreach scluster $clusters { set thestate [$AdminControl getAttributes $scluster {clusterName state}] puts $scluster $thestate }