Java

<< Back to wiki homepage

Table of contents:

Threads

Check list of threads in given process

top -H -p ${pid_number}

Get thread dump

kill -s QUIT ${pid_number}

or kill -3 if you like numbers. This will dump to the STDOUT, so check your syslog/journalctl.

Search for a specific thread in the dump

First find the PID of the thread, then convert to hex:

printf "%x\n" ${pid_number}

Then you can search nid=0x${resulted_hex} in the dump to find your thread.