Perform GC and CPU monitoring is disabled in VisualVM

I am monitoring Java web application running on tomcat server on localhost using VisualVM tool. The problem I am facing is the perform GC button in sampler is disabled. Why I want explicit Perform GC is that when I am creating heap dump without performing GC it is showing all of the objects created since application run including the objects which are dereferenced and ready for garbage collection. Creating a confusion which object is still alive and which is ready for GC.

I am attaching the snapshot of the same.

For any other needed information please comment. Thank you in advance. VisualVM Sampling


VisualVM is highly dependent on the JDK version you're using. This page lists the compatibility matrix between VisualVM release and the correspondent version shipped with JDK.

However, in my setup (Arch Linux, OpenJDK 8u144) VisualVM 1.3.9 cannot perform GC and monitor CPU usage for some java apps, even though they use the same JVM. In the end, downgrading to 1.3.8 did the trick for me.

链接地址: http://www.djcxy.com/p/79964.html

上一篇: 为什么是锯齿形图?

下一篇: 在VisualVM中禁用执行GC和CPU监视