## 使用Arthas
```
curl https://alibaba.github.io/arthas/arthas-boot.jar -k -o /opt/arthas-boot.jar
java -jar /opt/arthas-boot.jar
java -jar /opt/arthas-boot.jar -h
root@1d570207bde3:~# java -jar arthas.jar
[INFO] arthas-boot version: 3.1.0
[INFO] Found existing java process, please choose one and hit RETURN.
* [1]: 8 /home/tsppspucs.jar
1
[INFO] Start download arthas from remote server: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.1.0/arthas-packaging-3.1.0-bin.zip
[INFO] File size: 9.85 MB, downloaded size: 8.62 MB, downloading ...
[INFO] Download arthas success.
[INFO] arthas home: /root/.arthas/lib/3.1.0/arthas
[INFO] Try to attach process 8
[INFO] Attach process 8 success.
[INFO] arthas-client connect 127.0.0.1 3658
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-' |
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
wiki: https://alibaba.github.io/arthas
version: 3.1.0
pid: 8
time: 2019-03-30 10:32:11
$
```
```
- 反编译
jad **.*.psp.ucs.productinfodefend.**.service.impl.*****
```
## Arthas 基础命令
```
help——查看命令帮助信息
cls——清空当前屏幕区域
session——查看当前会话的信息
reset——重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端关闭时会重置所有增强过的类
version——输出当前目标 Java 进程所加载的 Arthas 版本号
history——打印命令历史
quit——退出当前 Arthas 客户端,其他 Arthas 客户端不受影响
shutdown——关闭 Arthas 服务端,所有 Arthas 客户端全部退出
keymap——Arthas快捷键列表及自定义快捷键
```
## 指令](https://alibaba.github.io/arthas/commands.html)
```
dashboard
thread
jvm
sysprop
sysenv
getstatic
ognl
sc
sm
dump
jad
classloader
mc
redefine
monitor
watch
trace
stack
tt
cat
pwd
options
```