Reputation: 9028
What is the best way howto monitor usage of Eden and Survivor heap spaces?
I have all the GC logging options on but I can see only YoungGen occupation:
-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
I would use VisualGC but cannot find its distribution anywhere. The default distribution of VisualVM that comes with JDK does not come with VisualGC. The VisualGC plugin links to the VisualGC site are broken.
UPDATE: jstat
is what I was looking for, specifically :
jstat -gcutil -t <pid> <interval> <number_of_samples>
Upvotes: 2
Views: 2901
Reputation: 719376
According to this page, you can download the relevant plugin center "updates.xml" file, an install it per the instructions. Then you can install the VisualGC plugin.
But the page also says that you should simply be able to install plugins using "Tools | Plugins | Available Plugins".
The links to projects on java.net
are often broken in my experience. You typically have to look harder to find stuff that is hosted there.
Upvotes: 3
Reputation: 128909
Depending on what you mean by "monitor", you might just need jstat. Check out the -gc* options.
Upvotes: 3