equal
deleted
inserted
replaced
180 |
180 |
181 and then attach with debugger:: |
181 and then attach with debugger:: |
182 |
182 |
183 $ jdb -attach $PORT |
183 $ jdb -attach $PORT |
184 |
184 |
|
185 Creating thread dump. |
|
186 ===================== |
|
187 |
185 Dump current thread traces and memory statistic to stdout:: |
188 Dump current thread traces and memory statistic to stdout:: |
186 |
189 |
187 $ kill -QUIT $PID |
190 $ kill -QUIT $PID |
|
191 |
|
192 If application started with ``nohup`` redirect output to selected file:: |
|
193 |
|
194 $ nohup java -cp ... com.app.Main >$NOHUP.log & |
|
195 |
|
196 or check default ``nohup.out`` or ``$HOME/nohup.out`` file. |
|
197 |
|
198 Alternatively use ``jstack`` utility for Java version 1.5 and above:: |
|
199 |
|
200 $ jstack -l $PID >$DUMP.out |
|
201 |
|
202 ``jstack`` should be runned from same user as probing application:: |
|
203 |
|
204 $ sudo -u $USER jstack -l $PID >$DUMP.out |
|
205 |
|
206 .. NOTE:: Thread information preserved in heap dump and can be reviewed in |
|
207 ``visualvm``. |
188 |
208 |
189 Creating heap dump from Java application. |
209 Creating heap dump from Java application. |
190 ========================================= |
210 ========================================= |
191 |
211 |
192 Find pid of Java process:: |
212 Find pid of Java process:: |