Skip to main content

How to generate thread dump?

  • December 21, 2021
  • 0 replies
  • 143 views

AkshayJadhav
StreamSets Employee
Forum|alt.badge.img

Thread dump is a snapshot of all threads running in the application at a point in time. It contains all the information about each thread in the application such as: thread state, thread Id, native Id, thread name, stack trace, priority.

Thread Dump can be generated by running the following command in the terminal window on the machine where the SDC instance is running:

sudo -u sdc jstack -l <pid> > thread_dump.txt 

(-F option (only if pid is unresponsive) -F Force a stack dump when 'jstack [-l] pid' does not respond)

OR
sudo -u sdc jcmd <pid> Thread.print > thread_dump.txt

The <pid> is ID of the SDC process. For example, when you run  ps aux | grep "sdc" command, you can find the PID (process ID) of the SDC process (as in the attached print screen, you can see that the instance of the SDC has pid 38482).

Also, please take an atleast 4-5 thread dump 10-15 secs apart from each other.

Did this topic help you find an answer to your question?
This topic has been closed for comments