title: Howto easily monitor usage of Eden and Survivor Spaces
body: <p>What is the best way howto monitor usage of <strong>Eden</strong> and <strong>Survivor</strong> heap spaces? </p>
  
  <p>I have all the <strong>GC logging options</strong> on but I can see only YoungGen occupation:</p>
  
  <blockquote>
    <p>-XX:+PrintTenuringDistribution -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=jvm.log -server  -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC  -Xloggc:gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -showversion -XX:+PrintClassHistogramBeforeFullGC -XX:+PrintClassHistogramAfterFullGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=15</p>
  </blockquote>
  
  <p>I would use <a href="https://blogs.oracle.com/klc/entry/visualgc_plugin_for_visualvm" rel="nofollow">VisualGC</a> but cannot find its distribution anywhere. The default distribution of VisualVM that comes with JDK does not come with VisualGC. The <a href="http://visualvm.java.net/plugins.html" rel="nofollow">VisualGC plugin links</a> to the VisualGC site are broken.</p>
  
  <p><strong>UPDATE:</strong> <code>jstat</code> is what I was looking for, specifically :</p>
  
  <pre><code>    jstat -gcutil -t &lt;pid&gt; &lt;interval&gt; &lt;number_of_samples&gt;
  </code></pre>