Jenkins‎ > ‎

Monitor Jenkins Java Threads Usage

If you want to monitor how much CPU each thread in Java uses you can proceed like this

The result will look like this, although lines are broken for readability:

<executable>java</executable>
<arguments>-Xrs -Xmx768m

    -Dcom.sun.management.jmxremote.ssl=false

    -Dcom.sun.management.jmxremote

    -Dcom.sun.management.jmxremote.port=12345

    -Dcom.sun.management.jmxremote.authenticate=false

    -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle

    -jar "%BASE%\jenkins.war" --httpPort=8080

</arguments>


Now start jenkins and let it run

  • Then cd into the bin folder of your JDK installation i.e. C:\Program Files\Java\jdk1.7.0_45\bin
  • Run jconsole -pluginpath <path_to>topthreads-1.1.jar 127.0.0.1:12345
  • Ignore the "insecure... " message.
Result:








Comments