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
dsconfigtool.For more information, see Configuring the JMX connection handler and alert handler.
-
Invoke the
jconsoleexecutable by enteringjconsolein your command-line interface or terminal.If <JDK_HOME> is not set in your path, you can access
jconsolein thebindirectory 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
jconsoleremotely, runjconsole <hostname:port>.If SSL is configured on the JMX Connection Handler, you must specify the PingDirectory server
.jarfile in the class path when runningjconsoleover 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.trustStorePathproperty with the full trust store path. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStoreTypeproperty if the default type, Java KeyStore (JKS), is not used. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStorePinproperty with the trust store file password, if there is one. -
Set the
com.unboundid.directory.server.protocol.jmx.trustStorePinFileproperty 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.trustStorePinproperty is used.When establishing a connection to
jconsole, a window opens asking if you want to retry connecting insecurely. Click Insecure connection.Although
jconsoleconsiders anything other thanSslRmiClientSocketFactoryto 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.