arthas
Diagnose and troubleshoot Java applications in real time.
TLDR
Attach to Java process
$ java -jar arthas-boot.jar [PID]
Select process interactively$ java -jar arthas-boot.jar
Attach with specific port$ java -jar arthas-boot.jar --telnet-port [3658] --http-port [8563] [PID]
SYNOPSIS
arthas-boot.jar [--telnet-port port] [--http-port port] [pid]
DESCRIPTION
Arthas is an Alibaba open-source Java diagnostic tool. It enables real-time monitoring and troubleshooting of Java applications without stopping them or modifying code.
Features include method tracing, class decompilation, monitoring metrics, and OGNL expression evaluation on live JVMs.
PARAMETERS
pid
Java process ID to attach--telnet-port port
Telnet console port--http-port port
HTTP API port--target-ip ip
IP to bind--tunnel-server url
Tunnel server URL
CONFIGURATION
~/.arthas/arthas.properties
Default configuration for telnet port, HTTP port, target IP, and tunnel server settings.
COMMON COMMANDS
dashboard
System overviewtrace class method
Trace method executionwatch class method
Watch method input/outputjad class
Decompile classsc pattern
Search loaded classesthread
Show thread infomonitor class method
Monitor method stats
CAVEATS
Attaching to production JVMs should be done carefully. Some features may impact performance. Requires compatible JVM version.
HISTORY
Arthas was developed by Alibaba and open-sourced in 2018. It has become a popular Java diagnostic tool, especially in the Chinese developer community.
