Giter Club home page Giter Club logo

gc-log-parser's Introduction

Summary

This Java library provides a parser for the GC logs produced by Oracle JDK 1.7 and 1.8. It includes a command line utility to generate CSV files from the logs. Your can load them in your favorite tool for analysis then. See the following inspiring article as an example - Using R to analyze Java G1 garbage collector log files.

Requirements

The library requires Java 1.8.

Documentation

Supported JVM Options

The library is able to parse the logs produced by using the key GC logging options:

  • -XX:+PrintGC (or -verbose:gc)
  • -XX:+PrintGCDetails
  • -XX:+PrintGCTimeStamps
  • -XX:+PrintGCDateStamps

The following Oracle JVM's garbage collectors are supported:

Generation Collector JVM Option
NewCopy-XX:+UseSerialGC
PS Scavenge-XX:+UseParallelGC
ParNew-XX:+UseParNewGC
G1 Young-XX:+UseG1GC
OldMarkSweepCompact-XX:+UseSerialGC
PS MarkSweep-XX:+UseParallelGC
-XX:+UseParallelOldGC
ConcurrentMarkSweep
(except iCMS)
-XX:+UseConcMarkSweepGC
G1 Mixed-XX:+UseG1GC

Provided Fields

The parser tries to extract as much information as possible from the log files. All possible fields that may present in the result CSV files are described in the table below. Exact subset of these fields depends on the GC options being used.

FieldDescription
Type Type of the GC pause event. Possible values are:
  • N - new (young) generation collection
  • O - old (tenured) generation collection (stop-the-world phase of the concurrent collector)
  • F - full collection
DateDate/time of the GC event
TimeTime passed since JVM start (in seconds)
PauseTimeGC pause time (in seconds)
UserPauseTimeCPU time spent in user space (in seconds)
SysPauseTimeCPU time spent in kernel space (in seconds)
RealPauseTimeReal time (in seconds) spent by GC (rounded value of PauseTime)
NewGenPauseTimeTime spent to collect young generation (in seconds)
OldGenPauseTimeTime spent to collect old generation (in seconds)
MemBeforeUsed heap memory before GC run
MemAfterUsed heap memory after GC run
MemTotalOverall allocated heap memory
NewMemBeforeUsed young generation space before GC run
NewMemAfterUsed young generation space after GC run
NewMemTotalOverall allocated young generation space
EdenMemBeforeUsed Eden space before GC run
EdenMemAfterUsed Eden space after GC run
EdenMemTotalOverall allocated Eden space
SurvivorMemBeforeUsed Survivor space before GC run
SurvivorMemAfterUsed Survivor space after GC run
OldMemBeforeUsed old generation space before GC run
OldMemAfterUsed old generation space after GC run
OldMemTotalOverall allocated old generation space
PermMemBeforeUsed permanent generation space before GC run
PermMemAfterUsed permanent generation space after GC run
PermMemTotalOverall allocated permanent space
MetaspaceMemBeforeUsed metaspace before GC run (since Java 8)
MetaspaceMemAfterUsed metaspace after GC run (since Java 8)
MetaspaceMemTotalOverall allocated metaspace (since Java 8)
ConcurrentPhaseStop-the-world phase of the concurrent old collector

Memory-related fields are extracted as is and measured either in Kylobytes or Megabytes.

Installation

Run Maven command to build a JAR file:

mvn clean install

License

Licensed under the Apache License 2.0.

gc-log-parser's People

Contributors

yshahun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.