Query server state using scripting
The following wsadmin commands use AdminControl to return a value of STARTED if the server is started, and an empty string if server is stopped.
Jacl...
### Identify the server and assign it to the server variable.
set server [$AdminControl completeObjectName cell=mycell,node=mynode, name=server1,type=Server,*]
### Query for the state attribute.
$AdminControl getAttribute $server stateJython...
server = AdminControl.completeObjectName('cell=mycell,node=mynode, name=server1,type=Server,*')
print server
print AdminControl.getAttribute(server, 'state')In an ND environment, we can query server state from the admin console.
Related tasks
Use AdminControl for scripted administration
Related
Commands for AdminControl