What is a JVM process

Create thread dumps from JVM

jstack script

Here is a script (adapted from the one on eclipse.org) that requires a number of thread backups using jstack. It also requires the CPU usage at the thread level, using a top-level command.

Just run it like this:
sudo -u <user> jstackSeries.sh <pid> <aemserveruser> <count> <delay>

For example::
sudo -u aemuser jstackSeries.sh 1234 aemserveruser 10 3

  • 1234 is the PID of the Java process
  • cq5serveruser is the Linux or UNIX user under which the Java process is running
  • 10 is the number of thread dumps to be created
  • 3 is the delay between each dump

Note: The top output has the native thread ID in decimal format, while the jstack output has the NID in hexadecimal format. You can adjust the high CPU thread from top to jstack output by converting the thread ID to hexadecimal format.

In addition to the script above, we also have a similar Windows Powershell script and an Adobe AEM-specific script on Github.

Thread Dump Tool for Adobe Experience Manager

With the Adobe Experience Manager product, you can install this tool for a simple UI for creating thread dumps.

Alternative ways to create a thread dump

If that jstack- If the tool is not available to you, you can create thread dumps as follows:

Note: Some tools cannot create thread dumps from the JVM when the command line parameter is enabled. If you are having problems creating thread dumps, you should check that this option is enabled.

UNIX, Mac OS X and Linux (JDK 1.4 or earlier version)

On UNIX, Mac OS X, and Linux, you can send a QUIT signal to the Java process to dump a thread on standard output.

  1. To do this, run this command:
    kill -QUIT <pid>
    You may need to run this command as sudo -u user kill -QUIT <pid> run, where "user" is the user under which the Java process is running.
  2. When you start CQSE with the crx-quickstart / server / start script, thread dumps are posted to crx-quickstart / server / logs / startup.log. If you are using a third-party application server such as JBoss, WebSphere, Tomcat, or others, refer to the server's documentation to find out which file the standard output is directed to.
  1. Download javadump.exe (attached below).
  2. Start the JVM with these three arguments (they must be in the correct order):
    -XX: + UnlockDiagnosticVMOptions -XX: + LogVMOutput -XX: LogFile =C: \ temp \ jvmoutput.log
  3. Press Ctrl + Shift + Esc to open Task Manager.
  4. Find the PID of the Java process.
  5. Run at the command line
    javadump.exe <pid> out
  6. The thread dump will appear in the file mentioned in step 2.
JDK 1.6

Create a thread dump with the tool jconsole by using an additional module: [0]

The following describes how to request a thread dump:

  1. Add the following parameter to the JVM running Communique: -Dcom.sun.management.jmxremote
  2. Download and install JDK 1.6 (if you haven't already).
  3. Download and extract the Thread Dump Analyzer utility. [1]
  4. From JDK 1.6, run:
  5. Click the tab Thread dumps.
  6. Click on the link Request thread dump.

Note: If you are using AEM 6. * And want to observe the running threads, you can request a thread list. Please note, however, that these thread dumps will not work with thread dump analysis tools such as samurai or tda.

Applies to

All Adobe products running in a JVM

Tools for analyzing thread dumps:

[0] https://docs.microsoft.com/de-de/sysinternals/downloads/psexec
[1] https://github.com/irockel/tda
[2] https://fastthread.io/
[3] https://www.ibm.com/support/knowledgecenter/en/SSLLVC_5.0.0/com.ibm.esupport.tool.tmda.doc/docs/readme.htm