Index of every page on this site: llms.txt
All skills
github avatar

/java-diagnostics

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

Symptom-first runtime diagnostics for JVM applications using JDK tools: jcmd, jstack, jmap, jstat, JFR, GC logs, async-profiler, Native Memory Tracking, and Eclipse MAT. Use when a Java app has high CPU, memory leaks or OutOfMemoryError, slow startup, deadlocks or thread starvation, long GC pauses, native memory growth, or slow requests. Includes permission tiers for safe use.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/java-diagnostics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesgc.md

≈403 tokens on demand. Your agent reads this file only when SKILL.md points to it.

GC logs and jstat

Unified GC logging (JDK 9+)

Enabling at startup is a restart, so treat it as Tier 2; overhead is low.

-Xlog:gc*=info:file=/var/log/app/gc.log:time,uptime,level,tags:filecount=5,filesize=20m

On a running JVM (Tier 2):

jcmd <pid> VM.log what=gc*=info output=gc.log decorators=uptime,time
jcmd <pid> VM.log list

JDK 8 uses -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log instead.

jstat (Tier 1)

jstat -gcutil <pid> 1000 10      # utilization %, sampled every 1s, 10 times
jstat -gc <pid> 1000 10          # capacities and sizes in KB
jstat -gccause <pid> 1000 5      # last GC cause

Watch: Old (O) occupancy after each full/mixed GC. If it keeps ratcheting up, suspect a leak (see heap). Rising FGC/FGCT means frequent full GCs.

Interpreting

  • Long pauses: look at pause time per event and the cause (Allocation Failure, Humongous Allocation, Metadata GC Threshold, System.gc()).
  • Frequent young GCs with high promotion: allocation rate too high or young gen too small.
  • Heap near max after GC: heap too small or leak; do not just raise -Xmx without checking.
  • Pause target: G1 default -XX:MaxGCPauseMillis=200; ZGC and Shenandoah target sub-millisecond-class pauses with more CPU/memory overhead. Change one tuning flag at a time and compare logs.
  • Tools such as GCeasy or GCViewer can visualize logs, but GC logs may reveal internal hostnames and sizing; do not upload from sensitive environments.
  • JFR also records GC events (jdk.GarbageCollection, jdk.GCPhasePause); see jfr.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts25d3 checks · Risk SAFE
  • Gen Agent Trust Hub25d

    This skill is a well-designed technical resource for JVM diagnostics. It provides clear, structured instructions for using industry-standard JDK tools and well-known third-party utilities. Security is a core component of the skill, which implements a permission tier system and provides explicit warnings and best practices for handling sensitive diagnostic data like heap dumps and flight recordings.

  • Socket25d

    No alerts

  • Snyk25d

    Risk: LOW · No issues

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated last month

README badge

README badge for github/awesome-copilot/java-diagnostics