title: Generate a Java thread dump without restarting.
body: <p>I'd like to create a thread that keeps track of the memory usage and cpu usage.</p>
  
  <p>If the application reaches a high level, I want to generate an heap dump or a thread dump.</p>
  
  <p>Is there a way to generate a Thread dump runtime without restarting?</p>