Learn more about the Tomcat child process
I have an application that has been deployed with .war in tomcat.
I am getting some problems with CPU consumption in this application and I would like to see some details about its processes. But when I run from the top, I just get something like this:
PID USER PR NI VIRT RES SHR S% CPU% MEME TIME + COMMAND
2310 app1 20 0 11.1g 1.4g 11m S 191.3 14.5 31: 32.67 java
21 root 20 0 0 0 0 S 11.7 0.0 0: 29.89 ksoftirqd / 4
3387 xymon 20 0 15156 1176 792 R 2.0 0.0 0: 00.01 up
1 root 20 0 19352 1528 1212 S 0.0 0.0 0: 00.54 init
But this only shows that tomcat / java is consuming my cpu. I would like to see what this cat's child process is the problem, but with the top command, just watch the tomcat process.
Thanks for the help.
source to share
You need to configure JMX to find out which processes / threads are consuming time.
Below Java_OPTS can be configured for JMX.
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Once this is done, you can use Jconsole or JVisualVM in the JDK directory as part of the JDK installation
source to share