Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes we do profile Tomcat applications.</p> <p>Go to <code>catalina.bat</code> or <code>catalina.sh</code> and this to your <code>JAVA_OPTS</code> (I am using Tomcat 6.0.16):</p> <pre><code>-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false </code></pre> <p>Your <code>JAVA_OPTS</code> should look like</p> <pre><code>set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false </code></pre> <p>Updated after Ryan comment that it is better to use <code>setenv.sh</code>. This is my <code>setenv.sh</code> for JDK 8. Missing few other settings but good to start with.</p> <pre><code>SUN_JVM_OPTS=" -server \ -XX:MaxMetaspaceSize=3G \ -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled \ -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 \ -XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark \ -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=3 -XX:GCLogFileSize=2M \ -XX:+HeapDumpOnOutOfMemoryError \ -Dsun.net.inetaddr.ttl=60 \ -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=8480 \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false" # Set custom application options here APPLICATION_OPTS="-Dlog4j.configurationFile=patht-to-log/log4j2.xml -Dlog4j.debug=true " JVM_OPTS="$GENERAL_JVM_OPTS $SUN_JVM_OPTS" CATALINA_OPTS="$JVM_OPTS $APPLICATION_OPTS" echo "Tomcat started with settings "$CATALINA_OPTS </code></pre> <p>Once you drop the <code>setenv.sh</code> in bin directory, you can see the changes in console on startup.</p> <p>Here's another step by step tutorial to profile Tomcat applications with Visual VM: <a href="http://www.skill-guru.com/blog/2010/11/11/troubleshooting-application-performance-with-visualvm/" rel="nofollow noreferrer">Trouble shooting application performance with Visual VM</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload