You can use the wsadmin tool and scripting to query server
states.
Before you begin
Before starting this task, the wsadmin tool must be running.
See the topic about starting the wsadmin scripting client using wsadmin
scripting for more information.
About this task
When querying the server state, the following command
steps return a value of STARTED if the server is started.
If the server is stopped, the command does not return a value.
Procedure
Identify the server and assign it to the server variable. The following example returns the server MBean that matches
the partial object name string:
Using Jacl:
set server [$AdminControl completeObjectName cell=mycell,node=mynode,
name=server1,type=Server,*]
Using Jython:
server = AdminControl.completeObjectName('cell=mycell,node=mynode,
name=server1,type=Server,*')
print server