arthas
Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
Arthas is a Java diagnostic tool from Alibaba that lets you inspect and troubleshoot a running Java application without stopping it, restarting it, or modifying its code. The core problem it solves is the difficulty of debugging production issues: production environments typically cannot be paused or attached to a debugger, and adding log statements requires a full redeploy cycle. Arthas attaches to an already-running Java process and gives you live visibility into what it is doing.
Arthas works by injecting a Java agent into the target JVM (Java Virtual Machine — the runtime that executes Java programs). Once attached, it gives you an interactive command-line interface where you can decompile classes to see what code is actually running in production, trace method calls to find which one is slow, view method parameters and return values in real time, check which threads are consuming the most CPU, inspect classloader hierarchies to diagnose jar version conflicts, monitor system metrics like garbage collection and memory usage, and even patch a running class without redeployment. It supports both local access via a terminal and remote access via a web browser console.
You would use Arthas when a production Java service is behaving unexpectedly and you need to diagnose it without taking the service offline — for example, tracking down an intermittent slowdown, verifying that a recently deployed class is the expected version, or finding which code path is throwing an exception. It runs on Java 6 through current versions and supports Linux, macOS, and Windows. The tech stack is Java, and it installs by downloading a single jar file and running it with the java command.