arthas
Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
Arthas: debugging a live JVM without restarting it
An Alibaba built Java diagnostic tool that lets developers troubleshoot production issues on the fly, without modifying code or restarting servers.
The problem it names
The background argument comes first. Production systems are often unreachable from local development environments, so IDE debugging is off the table. Debugging in production is worse: it suspends all threads. Reproducing issues in test or staging environments can fail because some problems vanish on restart or will not reproduce elsewhere. Adding log statements means shipping through test, staging, and production, which the README calls inefficient. Arthas was built to break that loop.
The mechanism
Arthas works as an observer. It never suspends existing threads, which is the key property. A developer can troubleshoot production issues on the fly, with no JVM restart and no additional code changes. The tool is described as a Java diagnostic tool from Alibaba, written in Java and licensed under Apache 2.0, with the homepage at arthas.aliyun.com.
Inspection features
The feature list targets common production questions. Check whether a class is loaded and where, which helps with jar file conflicts. Decompile a class to confirm the running code is what you think it is. View classloader statistics. Inspect method invocation details and stack traces. Trace method invocations to find slow sub invocations, and monitor invocation statistics such as qps and response time. These are read only style operations, fitting the observer model.
Operational extras
The README points to a quick start path on Linux, Unix, and Mac, with a one line install command that downloads a bootstrap script. The interactive interface opens by executing the script. A features tour walks through concrete commands: seeing what eats CPU ranked by usage, watching a method's first parameter and exceptions under specific conditions, monitoring invocation statistics every few seconds, and recording method invocations so the past can be replayed like a time tunnel.
Credits and lineage
The README credits its origins. The Arthas code base derived from Greys. Its terminal implementation is based on termd, an open source library for writing terminal applications in Java, and it uses bytekit, a Java bytecode kit. These credits make the tool's lineage explicit, from earlier Java diagnostics projects to the current one.
Editorial conclusion
Arthas is a diagnostic tool built around one constraint: never suspend the threads you are inspecting. The background section explains the pain it targets, and the feature list sticks to that same discipline.
Community notes