How do I monitor Artifactory’s resource utilization with JConsole?

JConsole (provided with the installed JDK) can be a great source to monitor Artifactory’s resource utilization.

The JConsole overview tab will show CPU/Memory utilization, and the number of threads that are active.


To connect JConsole to Artifactory JVM:

1. 

On $ARTIFACTORY_HOME/bin open artifactory.default

On JAVA_OPTIONS add the following property

‘-Dcom.sun.management.jmxremote’

For example:

export JAVA_OPTIONS=”$JAVA_OPTIONS -Djruby.compile.invokedynamic=false -Dfile.encoding=UTF8 -Dartdist=zip -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=trueJAVA”

2.

Restart Artifactory in order for the changes to be under affect.

3.

JConsole utility is located under $JAVA_HOME/bin

On this path, from the terminal, need to run the following command ./jconsole <Artifactory’s PID>

For example: ./jconsole 27111

One way to find it is by running the following command

ps -ef | grep artifactory

Another way, is to run jconsole without PID (./jconsole) and on the JConsole GUI to choose the following from the Local Process list:

‘org.apache.catalina.startup.Bootstrap’

(see attached screenshot).