GC Log Viewer Load File Add Graph Clear 50% 100% 150% Create Data Store Drop Data Store
{{success}}
{{error}}

Welcome to GC Log Viewer

GC Log Viewer is an online JVM gclog graphing tool. It is hoped that GC Log Viewer does away with the annoying situation of having to analyse a gclog file without any tools at hand. This is a first beta release of the application. The application was written to:

  • See what could be done with SVG,
  • Use the IndexedDB HTML 5 api,
  • Test out Angular JS in a real life application,
  • To see just how far HTML Applications have come and how far they still need to go. (Quite a bit.)
  • Better understand the GC Log output.

This application has been developed by Jumping Bean - An Java/Web application development and training company.. The repository is available on Github


How to use

A quick guide to GC Log Viewer.

Upload a log file

GC Log Viewer is a client side application, meaning it runs entirely in your browser. To start using the application upload your gclog file via the "Load File" menu item. The log entries are stored locally in an indexedDB object store. If your log file is large you may be prompted to allow the database to exceed the default maximum size, which varies from browser to browser.

The data will be persisted and available when need to analyze the data again. i.e you will not need to re-upload.

Add Graph

Once you have loaded your files graphs can be added to the display via the "Graph" menu item. You can load more than one graph at a time. On Firefox you can drag and drop graphs to rearrange them. Currently drag and drop doesn't work in Chrome. There is a bug related to this. Its been open for two years so doesn't look like its going to be fixed soon. Could also be that the drag and drop HTML api is so bad its not worth using. In a future release we may replace the drag and drop api with a custom implementation.

Zoom

On Chrome the SVG zoom functionality allows for zooming in on the generated graphs but the support or document is rudimentary making it almost unusable. The "zoom" menu item is meant to make it easy to reset your zoom to a sane level once you get lost.

Maintenance

Under the maintenance menu you can drop and create a new object store if you want to flush out all you data.

Test File

If you can't get it to work but would like to see what it can do, try downloading this log file and uploading it. samplegc.log

Issues and Supported GCLog file formats

The application has been tested with log files from a Java 8 JVM for the

  • Serial,
  • CMS,
  • Parallel garbage collectors
. Your mileage may vary.No support for G1 just yet. Mainly because they vary the unit of measure for memory. i.e sometime K sometime M. In general the engineers who have created the JVM GC log file formats are deranged individuals who seem to care very little about using a format that is easy to parse with any kind of tool. They prefer instead to wade through lines of text to find a problem it seems.

Capturing a log file

As a minimum you will need to add "-X:loggc:/path/to/gc.log" to your JVM options to capture a gc log file for uploading. For the best results it is recommended to turn on the -XX:+PrintGCDetails jvm option. How far we succeeded in extracting useful information from the log files is hard to say. Any feedback on bugs and errors in the generated graphs will be appreciated. If you have an issue also provide a snippet of the log file so we can see about improving the regular expression we use to extract the data. It is suspected that there will be a lot of log file formats in the wild will not be supported. Let us know.

Bugs

Please log issues on github

Future Plans

  • Currently the generated graph is rudimentary. We hope to add a graph of the pause time involved in each garbage collection at some point. The data is available it is just a case of generating the necessary graphs.
  • Add a IndexedDB query interface to allow for query of the loaded data. Should be fun!