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.

referencesjcmd-basics.md

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

jps and jcmd basics (Tier 1 for the safe commands; see the sensitive-output warning)

jps -l                       # list JVMs with PID and main class/JAR only (no arguments)
jcmd <pid> help              # commands supported by that JVM
jcmd <pid> VM.version
jcmd <pid> VM.flags          # effective -XX flags (no -D properties)
jcmd <pid> VM.uptime

Do NOT run these by default: they can print credentials, tokens, connection strings or other secrets passed as -D properties or program arguments, and the output lands in the transcript:

  • jps -v, jps -lv, jps -m, and bare jcmd (without arguments it also prints each JVM's main class and arguments)
  • jcmd <pid> VM.system_properties, jcmd <pid> VM.command_line, jinfo, ps aux / ps -ef / /proc/<pid>/cmdline for a Java process

They need user consent first (explicit tier: Tier 3, sensitive output). Prefer reading only the specific property you need (for example jcmd <pid> VM.system_properties | grep '^java.version'), and redact secret values before showing or sharing any output.

  • Run as the same OS user as the target JVM, on the same host (or inside the same container). Different users/containers fail with "Unable to open socket file" or "process not found".
  • jcmd is preferred over jstack/jmap/jinfo, which are older single-purpose tools.
  • -XX:+DisableAttachMechanism blocks attach; -XX:+StartAttachListener forces the listener to start.
  • Tools must match (or be newer than) the target JDK major version when possible.

Crash or hang

  • A crash writes hs_err_pid<pid>.log (path set by -XX:ErrorFile). Read the "Problematic frame" and thread sections first.
  • jhsdb (Tier 3) attaches to a hung process or core file: jhsdb jstack --pid <pid> or jhsdb jstack --exe <java> --core <core>. It suspends the process while attached and requires matching JDK; core files contain heap data, so treat them like heap dumps.

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