Example: Listing configuration objects with wsadmin
List configuration objects with the list command:
To get a list of all configuration objects of a specific type, use the following example:
$AdminConfig list ServerExample output:
dmgr(cells/mycell/nodes/mynode/servers/dmgr:server.xml#Server_1) nodeagent(cells/mycell/nodes/mynode/servers/nodeagent:server.xml#Server_1) server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)- To list all configuration objects of a given type within a scope:
- Obtain the ID of the configuration object to be used as the scope.
To use the configuration ID as a scope, the configuration id must be the same for a cell, node, or server object.
To get a configuration ID for a cell object, use the following example:
set scopeId [$AdminConfig getid /Cell:mycell/]To get a configuration ID for a node object, use the following example:
set scopeId [$AdminConfig getid /Cell:mycell/Node:mynode/]To get a configuration ID for a server object, use the following example:
set scopeId [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]- List the configuration objects within a scope.
To look for all the server configuration IDs within the node, use one of the following examples:
set scopeId [$AdminConfig getid /Cell:mycell/Node:mynode/] $AdminConfig list Server $scopeIdset scopeId [$AdminConfig getid /Cell:mycell/Node:mynode/] set nodeServers [$AdminConfig list Server $scopeId]The second example command assigns the returned list to a Jacl variable for subsequent use.