Using JConsole to Monitor Artifactory's Resource Utilization

Using JConsole to Monitor Artifactory's Resource Utilization

AuthorFullName__c
JFrog Support
articleNumber
000001527
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:38:26Z
lastModifiedDate
2024-03-10T07:47:58Z
VersionNumber
8

JConsole (which is provided with the installed JDK) can be a great resource for monitoring Artifactory's resource utilization. JConsole’s overview tab shows CPU/memory utilization, and how many threads are active.

To connect JConsole to the Artifactory JVM, follow these instructions:

1.  In the $ARTIFACTORY_HOME/bin folder, open the artifactory.default file
    In 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=true"

2.  Restart Artifactory for the changes to take effect.

3.  The JConsole utility is located in the $JAVA_HOME/bin folder. In Artifactory 7.X this is the /opt/jfrog/artifactory/app/third-party/java/bin folder.
In the $JAVA_HOME location, you’ll need to run the following command:

./jconsole <Artifactory_PID>
For example:

./jconsole 27111
One way to find the Artifactory PID is by running a "ps -ef" command and searching for "artifactory":

ps -ef | grep artifactory

Another way is to run JConsole without a PID (./jconsole). On the JConsole UI, choose the Artifactory process from the Local Process list:

'org.apache.catalina.startup.Bootstrap'