Run jconsole to monitor the memory usage and thread activity of a
Java virtual machine.
Before you can run jconsole, you must:
- Configure and enable the Java Management Extensions (JMX)
Java technology that provides tools for managing and monitoring applications, devices, system
objects, and service-oriented networks. Connection Handler for
the server using the dsconfig tool.
- Invoke the jconsole executable by entering
jconsole in your command-line interface or terminal.
Note:
If <JDK_HOME> is not set in your path, you can access
jconsole in the bin directory of the
<JDK_HOME> path.
-
To open the Java Monitoring & Management Console, run
jconsole:
- To monitor a specific process ID for your application, run
jconsole
<process ID>
.
- To run jconsole remotely, run
jconsole
<hostname:port>
.
If SSL is configured on the JMX Connection Handler, you must specify the PingDirectory server .jar file in
the class path when running jconsole over SSL, as in the
following example:
$ jconsole -J-Dcom.unboundid.directory.server.protocol.jmx.trustStorePath=$INSTANCE_ROOT/config/truststore -J-Dcom.unboundid.directory.server.protocol.jmx.trustStorePin=secret -J-Dcom.unboundid.directory.server.protocol.jmx.trustStoreType=JKS -J-classpath -J"$INSTANCE_ROOT/lib/*:/Library/Java/JavaVirtualMachines /jdk1.8.0_201.jdk/Contents/Home/lib/jconsole.jar"
Set the following properties in the above command:
Note:
When establishing a connection to jconsole, a window opens
asking if you want to retry connecting insecurely. Click Insecure
connection.
Although jconsole considers anything other than
SslRmiClientSocketFactory
to be insecure, choosing to retry
insecurely will enable PingDirectory's secure
client socket factory.
-
In the Java Monitoring & Administrative Console window,
click Local Process, and then click the
PID corresponding to the server.
-
Review the resource monitoring information.