Example: Migrating - Listing configured server groups
The following examples demonstrate how to list configured server groups in the WebSphere Application Server V4.0 and V5.0:
- wscp V4.0
ServerGroup listYou can put the result of this command into a Jacl list and invoke other operations, such as show, or modify, on the members of the list.- wsadmin V5.0
$AdminConfig list ServerClusterYou can put the result of this command into a Jacl list and invoke other configuration commands, such as show, or modify, on the members of the list. To invoke operational commands, such as stop, perform the following:
- Obtain the configuration ID of the cluster:
set myclust [$AdminConfig getid /ServerCluster:mycluster/]- Use the returned name to obtain the ObjectName of the running cluster MBean:
set runningCluster [$AdminConfig getObjectName $myclust]- The runningCluster has the object name for the running instance of the ServerCluster, or is empty if not running. Use this object name for control purposes, for example:
$AdminControl invoke $runningCluster stop