Example: Querying the server state using the wsadmin tool
The following example queries the server state.
- Identify the server and assign it to the server variable.
set server [$AdminControl completeObjectName cell=mycell,node=mynode,name=server1,type=Server,*]This command returns the server MBean that matches the partial object name string.Example output:
WebSphere:cell=mycell,name=server1,mbeanIdentifier=server.xml#Server_1,type=Server,node=mynode,process=server1,processType=ManagedProcess- Query for the state attribute.
$AdminControl getAttribute $server stateThe getAttribute command returns the value of a single attribute.Example output:
STARTED