title: java heap memory dump from the aws EC2 instance with tomcat8
body: <p>I have a Ubuntu 16.4 on an AWS EC2 instance and I have installed java 1.8 and tomcat 8 on this machine. I have deployed one Spring MVC application on this  machine. Quite often it gets out of memory issue. I want to analyze the heap dump and I tried by using the below command.</p>
  
  <p>sudo jmap -dump:format=b,file=/opt/tmp/heapdump.bin 37320</p>
  
  <p>But when I execute the above command got the below message.</p>
  
  <p>Unable to open socket file: target process not responding or HotSpot VM not loaded</p>
  
  <p>I want to get the java heap dump from my EC2 instance. 
  Thanks in advance.</p>