Installing VisualVM#

Download VisualVM, then unpack it:

$ wget https://github.com/visualvm/visualvm.src/releases/download/2.0.1/visualvm_201.zip
$ unzip visualvm_201.zip

Running VisualVM#

$ cd visualvm_201/bin
$ ./visualvm

Enabling JMX Port#

Select a port for JMX connection (e.g. 8010). If SELinux is enabled, enable the SELinux port:

$ semanage port -a -t http_port_t -p tcp 8010

Define the following Java system properties in Tomcat configuration. For PKI Systemd Service, the Tomcat configuration is in /etc/sysconfig/pki-tomcat. For standalone PKI server, the Tomcat configuration is in /var/lib/pki/pki-tomcat/conf/tomcat.conf.

JAVA_OPTS="-Dcom.sun.management.jmxremote.port=8010 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

Restart the server.

Connecting to PKI Server#

In VisualVM open File -> Add JMX Connection, enter PKI server’s hostname and JMX port, e.g. server.example.com:8010. The server will appear under Remote.

Monitoring PKI Server Machine#

Open Remote -> . It will open a panel that will provide information about the server machine including:

  • CPU load

  • Used physical memory

  • Total physical meory

  • Used swap memory

  • Total swap memory

Monitoring PKI Server Application#

Open Remote -> -> Tomcat. It will open a panel that will provide information about the server application including:

  • CPU usage

  • Heap size

  • Maximum heap size

  • Used heap size

See Also#