Version Differences for Dumps From a Java Process

(All Java Versions)
(Java 6)
Line 158:
  There may be different options for each type of Java installed. The commands listed below are known to work with the Java 6 JDK.    There may be different options for each type of Java installed. The commands listed below are known to work with the Java 6 JDK. 
       
- <br/>   + <table border=3 cellspacing=3 cellpadding=3 align=center>  
- === jstack (Thread Dump) ===   + <tr>  
- Using 'jstack', which is part of the JDK, you can run:   + <th>Command</th>  
    + <th>Arguments</th>  
    + <th>Description</th>  
    + </tr>  
    + <tr>  
    + <td align=center rowspan=1>'''jmap''' ''(Heap Dump)''</td>  
    + <td><font face=monospace>-dump:format=b,file=''filename'' process-id#</font></td>  
    + <td>Dumps the memory map of the target process-ID# to an '''hprof file''' within the current directory (or specified directory if you expand upon ''filename'')</td>  
    + </tr>  
    + <tr>  
    + <td align=center rowspan=2>'''jstack''' ''(Thread Dump)''</td>  
    + <td><font face=monospace>-l process-id#</font></td>  
    + <td>Prints long listing information (locks, synchronizers, etc.) on a specified process ID#</td>  
    + </tr>  
    + <tr>  
    + <td><font face=monospace>-l -F process-id#</font></td>  
    + <td>Force a stack dump when ''jstack'' isn't responding</td>  
    + </tr>  
    + </table>  
       
- '''jstack -l process-id#'''   + * '''jmap''' - This command will then dump the memory map of the target process-id# to an hprof file within the current directory (or specified directory if you expand on 'filename').  
    + * '''jstack''' - This command will then take a thread dump of the java process specified and dump it to the console. You may want to consider redirecting this output to a file with the ''>'' modifier.  
- '''jstack -F -l process-id#''' (if the process is hung)      
       
- This command will then take a thread dump of the java process specified and dump it to the console. You may want to consider redirecting this output to a file with the ''>'' modifier.      
       
- <br/>      
  == Java 7 ==    == Java 7 == 
  There may be different options for each type of Java installed. The commands listed below are known to work with the Java 7 JDK.    There may be different options for each type of Java installed. The commands listed below are known to work with the Java 7 JDK.