Arthas attaches to running JVM processes so developers can inspect classes, trace methods, and watch traffic without restarting apps or redeploying code. It supports interactive CLI, telnet, websocket, and browser console access.
Overview
Arthas is a diagnostic agent for Java applications originated at Alibaba. It is meant for troubleshooting live production or staging JVMs when remote IDE debugging is impractical or would pause business threads. The tool observes running code rather than stopping worker threads.
Operators can verify class loading and jar conflicts, decompile loaded classes, inspect classloader hierarchies, trace slow method paths, watch parameters and return values, and collect invocation statistics such as throughput and latency. System dashboards cover threads, CPU, and garbage collection behavior.
Sessions support tab-completed command-line interaction, profiler and flame-graph output, heap queries for instances of a type, in-memory compilation, and retransform for hotswap of external class files. A Spring Boot starter can bundle the agent with applications. Supported JDK versions span modern 8+ releases on Linux, macOS, and Windows.
Key features
- Attach to live JVM without restart
- Class search and decompilation
- Method trace, watch, and stack
- Invocation monitoring statistics
- Dashboard for CPU and GC metrics
- Telnet, websocket, and web console
- Profiler and flame graph output
- Classloader and conflict diagnostics
Use cases
- Production Java incident triage
- Finding slow method sub-calls
- Resolving classpath conflicts
- Hot-swapping classes in running JVMs
- Observing parameters and exceptions live