Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Perform the following steps to query the server state:
set server [$AdminControl completeObjectName cell=mycell,node=mynode,name=server1,type=Server,*]
server = AdminControl.completObjectName('cell=mycell,node=mynode,name=server1,type=Server,*') print server
Example output:
WebSphere:cell=mycell,name=server1,mbeanIdentifier=server.xml#Server_1,type=Server,node=mynode,process=server1,processType=ManagedProcess
$AdminControl getAttribute $server state
print AdminControl.getAttribute(server, 'state')
The getAttribute command returns the value of a single attribute. Example output:
STARTED
Related concepts
AdminControl object for scripted administration
Related reference
Commands for the AdminControl object