+

Search Tips   |   Advanced Search

Querying server state

We can use wsadmin.sh and scripting to query server states.

Before starting this task, wsadmin.sh must be running. See the topic about starting the wsadmin scripting client for more information.

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.

In a WAS Network Deployment environment, we also can query for the server status from the deployment manager. If the server is active, the command returns the STARTED return value. If the server is stopped, the command returns the STOPPED return value. If the server is down there is no MBean server and completeObjectName will be returned as an empty string. Trying to use an empty string for the completeObjectName in any MBean server API (including AdminControl in wsadmin) would result in an error. Perform the following steps to query the server state:


Related tasks

  • Use the wsadmin scripting AdminControl object for scripted administration
  • Start the wsadmin scripting client

  • Commands for the AdminControl object