Installing Visual GC Plugin

This section provides a tutorial example on how to install the Visual GC plugin to Java VisualVM and monitor GC activities.

One very interesting plugin is the Visual GC, developed by Jiri Sedlacek. The description says:

Integration of the Visual GC tool into VisualVM. Visual GC user interface is displayed for each local or remote application with performance counters available via jvmstat API.

The Visual GC tool attaches to an instrumented HotSpot JVM and collects and graphically displays garbage collection, class loader, and HotSpot compiler performance data.

See the Visual GC home page for information on using the tool: http://java.sun.com/performance/jvmstat/visualgc.html.

Let's try it out:

1. Run Java VisualVM, and click "Tools > Plugins".

2. Click the "Available Plugins" tab and check "Visual GC" in the list.

3. Click the "Install" button and follow the installation screen to finish.

4. Run LongSleep.java and connect Java VisualVM to monitor it.

5. Click the new "Visual GC" tab, representing the Visual GC plugin. You will see GC activities are monitored and displayed as space bars, line graphs and histograms as shown below:
Java VisualVM - Visual GC Plugin

Last update: 2015.

Table of Contents

 About This Book

 Java Tools Terminology

 Installing Java 8 on Windows

 'javac' - The Java Program Compiler

 'java' - The Java Program Launcher

 'jdb' - The Java Debugger

 'jconsole' - Java Monitoring and Management Console

 'jstat' - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

jvisualvm (Java VisualVM) - JVM Visual Tool

 What Is jvisualvm (Java VisualVM)?

 jvisualvm Command to Open Dump Files or Conections

 Connecting Java VisualVM to a Local JVM Process

 Monitoring Usgaes of CPU, Heap, Classes and Threads

 Monitoring Thread Status as Timeline

 Taking Thread Dump to See Thread Stack Traces

 Taking Heap Dump to See Memory Usages

 Viewing a Heap Dump File

 Connecting to Remote JVM Processes

 Avaible Plugins and Installation

Installing Visual GC Plugin

 'jar' - The JAR File Tool

 'javap' - The Java Class File Disassembler

 'keytool' - Public Key Certificate Tool

 'native2ascii' - Native-to-ASCII Encoding Converter

 Outdated Tutorials

 References

 PDF Printing Version