# Obtaining Network Server runtime information

Use the `runtimeinfo` command or the `getRuntimeInfo` method to get memory usage and current session information about the Network Server, including user, database, and prepared statement information.

- To run `runtimeinfo` from the command line:

      java org.apache.derby.drda.NetworkServerControl runtimeinfo
         [-h <hostname>][<-p portnumber>]

- The `getRuntimeInfo` method returns the same information as the `runtimeinfo` command. The signature for the `getRuntimeInfo` method is

      String getRuntimeInfo()

  For example:

      NetworkServerControl serverControl = new NetworkServerControl();
      String myinfo = serverControl.getRuntimeInfo();

Parent topic: Obtaining system information by using the API
Related tasks
Obtaining Network Server properties by using the getCurrentProperties method