Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## GETSTATE

Returns the current state of a server.

For more information about server states, refer to "Server Life Cycle" in the Configuring and Managing WebLogic Server guide.

If a server instance is in a deadlocked state, it can respond to `weblogic.Admin` commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option is to shut down the server instance by killing the Java process that is running the server. You will lose all session data. For information on enabling the domain-wide administration port, refer to "Enabling the Domain-Wide Administration Port" in the Administration Console Online Help.

### Syntax

>     java [ SSL Arguments ] weblogic.Admin
>          [ Connection Arguments ]
>          [ User Credentials Arguments ]
>        GETSTATE [targetServer]

Argument | Definition
--- | ---
`targetServer` | The name of the server for which you want to retrieve the current state. If you do not specify a value, the command returns the state of the server that you specified in the `-url` argument.

### Example

The following example returns the state of a WebLogic Server instance that runs on a machine named AdminHost:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>        -password weblogic GETSTATE

For more information about the environment in which this example runs, refer to Example Environment.

If the command succeeds for a running server, it returns the following:

`Current state of "MedRecServer" : RUNNING`

For a complete list of server states, refer to "Server Life Cycle" in the Configuring and Managing WebLogic Server guide.