We noticed frequent Full GC entries in the GC log(for more than 3-4 hrs). Our XmX was 1.2g and all full GC's didn't recover much. VM stayed at around 1 g.
To see what is held in the heap, we took the heap dump but in Memory Analyzer Tool, we see only 30% occupied and remaining 70% free.
Heap file size is 1g though.
we used :live option to take the heap dump.
/usr/<java_version>/bin/jmap -dump:live,format=b,file=heap.bin <pid>
Is there any other way to get the complete snapshot of heap?