- To know the # of instances & type of objects in the heap in a simple and quick way,
- jmap -histo
> snapshot1.txt - Sample Output:
--------------------------------------
1: 5555 6013016 java.util.Hashmap
2: 103 482888 org.apache....
3: 2000 334928 org.jboss...
4: 1280 274976 org.spring...
- To troubleshoot a memory leak, do the above command multiple time and observe the snapshot.
- jconsole is good enough, but this give a verbose details on the memory.
- jhat is cool utility to browse the object topology over http on a specific port for analysis.
No comments:
Post a Comment