Posts

Showing posts from May, 2012

Generate Heap Dump in Unix

Image
Heap dump provides the insight into the JVM - shows live objects on the heap (reachable and unreachable) along with their types and values. In addition it also provides no of objects and their size as %age of total heap size.We have many ways to get the heap dump in Windows. Some are as follows:- jconsole jVisual VM Eclipse MAT ....and it goes on Out of above , i like jVisualVM the most due to its monitoring capability, interactive display, and easy to use. But the problem comes with the unix. Even though we can monitor the application remotely  but we cannot see the live objects, their size and number i.e we cannot get the heap dump remotely. To get the heap dump on Unix machine, we can use j map.  To use jmap , we need the process id of java application. At times, we have lot many java process running in unix and its difficult to identify. Java provides jps tool which list the JVM with the process Id which it got the access . The steps are as follows:- Type jps on un