title: Java : Get heap dump without jmap or without hanging the application
body: <p>In few circumstance, our application is using around 12 GB of memory.
  We tried to get the heap dump using jmap utility. Since the application is using some GB of memory it causes the application to stop responding and causes problem in production.</p>
  
  <p>In our case the heap usage suddenly increases from 2-3 GB to 12GB in 6 hours. In an attempt to find teh memory usage trend we tried to collect the heap dump every one hour after restarting the application. But as said since using the jmap causes the application to hang we need to restart it and we are not able to get the trend of memory usage.</p>
  
  <p>Is there a way to get the heap dump without hanging the application or is there a utility other than jmap to collect heap dump.</p>
  
  <p>Thoughts on this highly appreciated, since without getting the trend of memory usage it is highly difficult to fix the issue.</p>
  
  <p>Note: Our application runs in CentOS.</p>
  
  <p>Thanks,
  Arun</p>