Creating thread dump.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 28 Dec 2015 13:52:38 +0200
changeset 1848 17256527f85e
parent 1847 1333ab54cab1
child 1849 a3b639d803e7
Creating thread dump.
java.rst
--- a/java.rst	Fri Dec 25 18:00:10 2015 +0200
+++ b/java.rst	Mon Dec 28 13:52:38 2015 +0200
@@ -182,10 +182,30 @@
 
   $ jdb -attach $PORT
 
+Creating thread dump.
+=====================
+
 Dump current thread traces and memory statistic to stdout::
 
   $ kill -QUIT $PID
 
+If application started with ``nohup`` redirect output to selected file::
+
+  $ nohup java -cp ... com.app.Main  >$NOHUP.log &
+
+or check default ``nohup.out`` or ``$HOME/nohup.out`` file.
+
+Alternatively use ``jstack`` utility for Java version 1.5 and above::
+
+  $ jstack -l $PID  >$DUMP.out
+
+``jstack`` should be runned from same user as probing application::
+
+  $ sudo -u $USER jstack -l $PID  >$DUMP.out
+
+.. NOTE:: Thread information preserved in heap dump and can be reviewed in
+          ``visualvm``.
+
 Creating heap dump from Java application.
 =========================================