title: How to monitor java application memory usage in Docker
body: <p>I run the java web application on tomcat in the Docker container. </p>
  
  <p>Is there any way to monitor the memory usage of the java application? I try to use <code>jconsole</code> with the process id of the docker, but it tells me <code>Invalidate process id</code></p>
  
  <p>I also enable JMX in tomcat, but don't know how to bind to it. I can use <code>visualvm</code> from my local to bind the host machine, but can not find way to bind to the docker inner the host. </p>
  
  <p>Is there any good way to achieve this?</p>
  
  <p>Thanks</p>