|
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'). |
|
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'). |
|
|
+ |
There may be different options for each type of Java installed. The commands listed below are known to work with the Java 7 JDK.
|
|
|
+ |
Using 'jmap', which is part of the JDK, you can run one of the following commands:
|
|
|
+ |
'''jmap -heap process-id#'''
|
|
|
+ |
'''jmap -histo process-id#'''
|
|
|
+ |
This command will then dump a summary of the current memory map to the console. While not as sophisticated as the later versions of java, it still provides some basic functionality.
|
|
|
+ |
# Java 6 'jmap' info: [http://docs.oracle.com/javase/1.5.0/docs/tooldocs/share/jmap.html jmap - Memory Map]
|