LinuxCommandLibrary

arthas

Diagnose and troubleshoot Java applications in real time.

TLDR

Attach to Java process

$ java -jar arthas-boot.jar [PID]
copy
Select process interactively
$ java -jar arthas-boot.jar
copy
Attach with specific port
$ java -jar arthas-boot.jar --telnet-port [3658] --http-port [8563] [PID]
copy

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 overview
trace class method
Trace method execution
watch class method
Watch method input/output
jad class
Decompile class
sc pattern
Search loaded classes
thread
Show thread info
monitor 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.

SEE ALSO

jstack(1), jmap(1), jconsole(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community