Requesting a Cloud Shell.Succeeded.
Connecting terminal
Welcome to Alibaba Cloud Shell!
Type "help" to learn about Cloud Shell
Type "aliyun" to use Alibaba Cloud CLI
shell@Alicloud:~$ wget https://arthas.aliyun.com/arthas-boot.jar;java -jar arthas-boot.jar
--2021-04-09 21:19:12-- https://arthas.aliyun.com/arthas-boot.jar
Resolving arthas.aliyun.com (arthas.aliyun.com)... 203.119.207.114
Connecting to arthas.aliyun.com (arthas.aliyun.com)|203.119.207.114|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 140961 (138K) [application/java-archive]
Saving to: ‘arthas-boot.jar’
arthas-boot.jar 100%[===================================================>] 137.66K 390KB/s in 0.4s
2021-04-09 21:19:12 (390 KB/s) - ‘arthas-boot.jar’ saved [140961/140961]
[INFO] arthas-boot version: 3.5.0
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 1397 /home/shell/nacos/target/nacos-server.jar
[2]: 2590 arthas-demo.jar
1
[INFO] Start download arthas from remote server: https://arthas.aliyun.com/download/3.5.0?mirror=aliyun
[INFO] Download arthas success.
[INFO] arthas home: /home/shell/.arthas/lib/3.5.0/arthas
[INFO] Try to attach process 1397
[INFO] Attach process 1397 success.
[INFO] arthas-client connect 127.0.0.1 3658
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-' |
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
wiki https://arthas.aliyun.com/doc
tutorials https://arthas.aliyun.com/doc/arthas-tutorials.html
version 3.5.0
main_class
pid 1397
time 2021-04-09 13:19:24
[arthas@1397]$ help
NAME DESCRIPTION
help Display Arthas Help
auth Authenticates the current session
keymap Display all the available keymap for the specified connection.
sc Search all the classes loaded by JVM
sm Search the method of classes loaded by JVM
classloader Show classloader info
jad Decompile class
getstatic Show the static field of a class
monitor Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
stack Display the stack trace for the specified class and method
thread Display thread info, thread stack
trace Trace the execution time of specified method invocation.
watch Display the input/output parameter, return object, and thrown exception of specified method invocation
tt Time Tunnel
jvm Display the target JVM information
perfcounter Display the perf counter information.
ognl Execute ognl expression.
mc Memory compiler, compiles java files into bytecode and class files in memory.
redefine Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
retransform Retransform classes. @see Instrumentation#retransformClasses(Class...)
dashboard Overview of target jvm's thread, memory, gc, vm, tomcat info.
dump Dump class byte array from JVM
heapdump Heap dump
options View and change various Arthas options
cls Clear the screen
reset Reset all the enhanced classes
version Display Arthas version
session Display current session information
sysprop Display, and change the system properties.
sysenv Display the system env.
vmoption Display, and update the vm diagnostic options.
logger Print logger info, and update the logger level
history Display command history
cat Concatenate and print files
base64 Encode and decode using Base64 representation
echo write arguments to the standard output
pwd Return working directory name
mbean Display the mbean information
grep grep command for pipes.
tee tee command for pipes.
profiler Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
stop Stop/Shutdown Arthas server and exit the console.
[arthas@1397]$ echo "hello,world" > /tmp/a.txt
[arthas@1397]$ cat /tmp/a.txt
hello,world
[arthas@1397]$
Arthas入门(一)
最新推荐文章于 2025-05-14 14:19:33 发布