Skip to content
HUIAHUB

alibaba/arthas/skills

Arthas JVM diagnostics

Guides an agent in diagnosing Java application and JVM issues with Arthas.

Agent skillAgent skillsApache-2.0
No scriptsNo networkNo hooksNo secretsSee the security check

What Arthas JVM diagnostics does

The Arthas skill guides a coding agent through diagnosing problems in running Java applications. It directs the agent to select a troubleshooting guide based on the reported issue and begin with lower-risk, read-only commands. For high CPU usage, the agent checks CPU, thread, and garbage collection metrics with dashboard. It then uses thread to identify busy threads and examine their stacks. If needed, bounded stack, trace, or watch commands help narrow the suspected method or execution path.

For EagleEye tracing, the agent first checks whether the EagleEye class exists. It selects a request-handling method and uses watch to retrieve the current trace ID, or trace to examine method timing and trace information when EagleEye is integrated. The resulting ID can be used to locate the corresponding request in logs or tracing systems.

For Spring problems, the agent uses vmtool to locate the correct application context, inspect configuration values and their sources, check bean existence, search by name or type, and examine bean definitions. The instructions favor read-only inspection and warn against accidentally initializing beans. Each investigation should end with a summary of the symptoms, supporting command output, an initial diagnosis, and recommended next steps. Method-observation commands must have execution limits to reduce their impact on running applications.

Install

curl -O https://arthas.aliyun.com/arthas-boot.jar

Read the security check below before you run it. The repository's own instructions win if they differ.

Security check

What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".

Runs scripts
No
Uses the network
No
Installs hooks
No
Asks for secrets
No

The supplied scan found no executable scripts, network calls, hook definitions, or secret variables in the skill folder. The files contain diagnostic instructions. Installing Arthas separately through the listed download command requires network access. Following the skill can inspect live JVM threads, method arguments, trace IDs, heap objects, and Spring configuration values. Some observation commands add runtime overhead or expose application data in their output. Review the commands before allowing an agent to execute them, inspect the Arthas download source, and start in a test environment. Keep method matching narrow and enforce the documented -n execution limits.

Scan details: No scripts, hook definitions, network calls or secret variables were found in the skill folder. Checked at commit 2b6d0e59bd37.

Use cases

  • Identify busy JVM threads and investigate methods responsible for high CPU usage.
  • Retrieve EagleEye trace IDs from requests without changing application code.
  • Inspect Spring ApplicationContext instances, bean registration, and configuration values.
  • Investigate slow Java application responses using thread stacks and method tracing.

Limitations

  • Requires Arthas and access to the Java application being diagnosed. The download command installs the Arthas launcher, not the agent skill.
  • EagleEye tracing requires the relevant EagleEye class and tracing integration to be present.
  • Observation commands need execution limits. Broad method matching or excessive tracing can put pressure on production applications.
  • Direct Spring `getBean()` calls can initialize beans and cause side effects. Selecting the wrong classloader can also prevent inspection.

Sources