apache > db
Apache DB Project
Font size:      

System information

System information

You can get information about the Network Server such as version and current property values, Java information, and Derby database server information, using the sysinfo tool. Sysinfo is available from the command line or the NetworkServerControl API.

Using the command line

To run sysinfo from the command line, use the following command while the Network Server is running:

java org.apache.derby.drda.NetworkServerControl sysinfo [-h <host>][-p <portnumber>] 

Using the API

The sysinfo method produces the same information as the sysinfo command. The signature for this method is

String getSysinfo();

For example:

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

returns information about the Network server running on the current machine on port 1527.


Use the runtimeinfo command to get runtime information about the Network Server. This command will provide information about memory usage and current sessions, including the user, database, and prepared statement information.

Using the command line:

To run runtimeinfo from the command line, enter:

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

Using the API:

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(); 

getCurrent Properties

There is an additional Java method you can use to get information about the Network Server - the getCurrent Properties method.

The getCurrentProperties method returns a Properties object with the value of all the NetServer properties as they are currently set.

The signature of this method is:

Properties getCurrentProperties();

For example:

NetworkServerControl server = new NetworkServerControl();
Properties p = server.getCurrentProperties();

As shown above, you can get the current properties and then work with individual properties if needed using various API's on Properties class. You can also print all the properties on System.out using the Properties.list() method.

Previous Page
Next Page
Table of Contents