Running JConsole
Run jconsole
to monitor the memory usage and thread activity of a Java virtual machine.
Before you begin
Before you can run jconsole
, you must:
-
Configure and enable the Java Management Extensions (JMX) Connection Handler for the server using the
dsconfig
tool.For more information, see Configuring the JMX connection handler and alert handler.
-
Invoke the
jconsole
executable by enteringjconsole
in your command-line interface or terminal.If <JDK_HOME> is not set in your path, you can access
jconsole
in thebin
directory of the<JDK_HOME>
path.
Steps
-
To open the Java Monitoring & Management Console, run
jconsole
:Choose from:
-
To monitor a specific process ID for your application, run
jconsole <process ID>
. -
To run
jconsole
remotely, runjconsole <hostname:port>
.
If SSL is configured on the JMX Connection Handler, you must specify the PingDirectory server
.jar
file in the class path when runningjconsole
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:
-
Set the
com.unboundid.directory.server.protocol.jmx.trustStorePath
property with the full trust store path. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStoreType
property if the default type, Java KeyStore (JKS), is not used. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStorePin
property with the trust store file password, if there is one. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStorePinFile
property with the file path containing the trust store password in plain text.Do not use this property if the
com.unboundid.directory.server.protocol.jmx.trustStorePin
property is used.
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 thanSslRmiClientSocketFactory
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.