...
Find out the PID of the Content Gateway process by running this command
Code Block PID=$(ps aux | grep [c]loudgateway.pid | awk '{ print $2 }')
Capture the thread dump using jstack and the open file descriptors using lsof by running these commands using the PID determined at step 1
Code Block jstack $PID > thread_dump.txt lsof -p $PID > lsof.txt
If the above command does not capture anything, try running this to force a thread dump from a non-responsive process:
Code Block jstack -F $PID > thread_dump.txt
If you are using JDK 11+, forcing a thread dump requires this command
Code Block jhsdb jstack --locks --pid $PID > thread_dump.txt
Repeat the jstack/lsof commands 3 times total a few seconds apart like this:
Code Block for i in $(seq 3); do jstack $PID > thread_dump-$i.txt; lsof -p $PID > lsof-$i.txt; sleep 3060;done
or ( for JDK 8 )
Code Block for i in $(seq 3); do jstack -F $PID > thread_dump-$i.txt; lsof -p $PID > lsof-$i.txt; sleep 3060;done
or (for JDK11+)
Code Block |
---|
for i in $(seq 3); do jstack --locks --pid $PID > thread_dump-$i.txt; lsof -p $PID > lsof-$i.txt; sleep 60;done |
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...