JVM GC Log Analyzer: Pauses, Leaks, Full GCs

    by Singgih Rochmad Saputro

    1

    Reads a Java service's garbage collection log and tells you why it pauses or runs out of memory, with the setting or code change that fixes it.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Reads GC logs from Java 8 through current versions and all the common collectors
    • Shows how long the app was paused, how often, and how much time it lost to GC
    • Spots memory that keeps growing across the log, the usual sign of a leak
    • Names the cause of each Full GC and long pause in plain words
    • Catches GC threads starved of CPU by container limits
    • Gives the exact JVM flag or code change to try first, and how to confirm it worked

    Who it's for

    Backend developers on Java, Kotlin or Scala

    Turns a long GC log into a verdict, the numbers behind it and the fix, without a separate tool.

    Try asking: “Here's gc.log from our order service, why does p99 latency spike every few minutes?”

    SRE and on-call engineers

    Tells in minutes whether a slow or restarting JVM is a leak, a too-small heap or CPU throttling.

    Try asking: “Our pod gets OOMKilled every night, here's the GC log, is it a leak?”

    Teams moving a JVM app into containers

    Finds the heap, GC thread and CPU limit settings that hurt after the move to Kubernetes.

    Try asking: “Pauses got much longer after we moved to Kubernetes, check this GC log”

    JVM GC Log Analyzer: Pauses, Leaks, Full GCs

    Example session with this skill installed

    Here's gc.log from our payment API (G1, 4 GB heap). Latency spikes every few minutes and it got OOMKilled last night. What's wrong?

    • Read your context and instructions
    • Compiled the jvm gc log

    Verdict: live data keeps growing, a memory leak or heap too small.

    1,284 pauses, 3m 12s in total, p50 18.2 ms, p99 412.0 ms, max 2.84 s. Throughput 96.9%.
    Lowest heap after GC by third of the log: 1210 → 2240 → 3390 MB.

    Findings: live data keeps growing (problem); 3 Full GCs, longest 2.84 s, cause G1 Compaction Pause (problem); 2 evacuation failures (problem).

    Fix first: take a heap dump at a high point (jcmd <pid> GC.heap_dump) and look at the dominator tree; the Full GCs and evacuation failures follow from the heap filling up.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A JVM's GC log holds the answer to most "why is it slow" and "why does it keep running out of memory" questions, but a few hours of logging is tens of thousands of lines in one of a dozen formats.

    This skill gives your AI agent a small offline analyzer and a reference of fixes. Give it the GC log (rotated files too) and it reports:

    • The verdict in one sentence, ranked by severity.
    • Pause numbers: count, total, p50, p95, p99 and max per pause type, and the share of time spent outside GC.
    • Live data over time: the lowest heap after GC in each third of the log, which shows a leak or a heap too small for its data.
    • Causes: Full GCs and what triggered them, evacuation failures, humongous (very large) allocations, metaspace, System.gc() calls from code, RMI or monitoring tools, ZGC allocation stalls, Shenandoah degenerated cycles, CMS concurrent mode failures, and GC threads waiting for CPU under container limits.
    • The fix for each: the JVM flag to change or the code pattern to look for, and what the report should show once it's fixed.

    Works with JDK 9+ unified logging (-Xlog:gc*) for G1, Parallel, Serial, ZGC and Shenandoah, and JDK 8 logs (-XX:+PrintGCDetails) for Parallel, CMS and G1. Nothing leaves your machine.

    Only stop-the-world pauses count toward throughput; the CPU that ZGC and Shenandoah spend concurrently is not shown. OpenJ9 (IBM) verbose GC XML is not parsed. One log covers one JVM. A live set that grows over a short log can be warm-up rather than a leak; use several hours of log before calling it a leak.

    Built as an Agent Skill (SKILL.md) for Claude Code and other agents that read SKILL.md and can run Python. Files: SKILL.md (when and how to use it), scripts/gc_log.py (the analyzer, Python 3.8+ standard library only), references/fixes.md (flags and code changes per finding). Usage: python3 scripts/gc_log.py gc.log.0 gc.log.1 gc.log [--pause-goal 100] [--json]. Rotated files are passed oldest first. Output is Markdown by default or JSON with --json. Exit code 0 means healthy, 1 means problems or warnings were found, 2 means the input is not a GC log. Parsing: unified log decorations (uptime, time), pause lines with heap before/after/capacity, User/Sys/Real times, ZGC cycle lines and allocation stalls, humongous region counts, region size and max heap from the startup lines. JDK 8: PrintGCDetails lines for PSYoungGen/ParOldGen, ParNew/CMS, DefNew and G1 (with the Heap: and Times: lines that follow). Reads only the files you pass; no network access, nothing written.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    Python 3.8+

    Permissions

    Terminal / Shell
    Read Files

    File Scopes

    The
    GC
    log
    files
    you
    pass
    to
    it

    Reads only the log files given on the command line. No network access, no API keys, writes nothing.

    Listedtoday

    What's inside

    Frequently Asked Questions

    Reads a Java service's garbage collection log and tells you why it pauses or runs out of memory, with the setting or code change that fixes it.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use JVM GC Log Analyzer: Pauses, Leaks, Full GCs on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.