Arthas 系列[一] Dashboard
介绍
dashboard 作为 arthas 最基础的功能,为我们提供了丰富的客户化界面,简单直观的展示了我们最为关注的常用信息:
- thread: 线程信息
- memory: 内存信息
- runtime: 运行时信息
使用
启动 arthas
$ java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.5.1
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 168 math-game.jar
1
^[[INFO] arthas home: /root/.arthas/lib/3.5.1/arthas
[INFO] Try to attach process 168
[INFO] Attach process 168 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.1
main_class
pid 168
time 2021-05-27 13:34:53
开启 dashboard
[arthas@168]$ dashboard
## 线程信息
ID NAME GROUP PRIORIT STATE %CPU DELTA_T TIME INTERRUP DAEMON
-1 C1 CompilerThread0 - -1 - 0.0 0.000 0:1.274 false true
-1 C2 CompilerThread0 - -1 - 0.0 0.000 0:1.228 false true
23 arthas-NettyHttpTelnetBo system 5 RUNNABL 0.0 0.000 0:0.267 false true
1 main main 5 TIMED_W 0.0 0.000 0:0.220 false false
-1 VM Periodic Task Thread - -1 - 0.0 0.000 0:0.213 false true
-1 VM Thread - -1 - 0.0 0.000 0:0.157 false true
11 Attach Listener system 9 RUNNABL 0.0 0.000 0:0.043 false true
16 arthas-NettyHttpTelnetBo system 5 RUNNABL 0.0 0.000 0:0.039 false true
28 arthas-NettyHttpTelnetBo system 5 RUNNABL 0.0 0.000 0:0.023 false true
27 arthas-NettyHttpTelnetBo system 5 RUNNABL 0.0 0.000 0:0.022 false true
24 arthas-command-execute system 5 TIMED_W 0.0 0.000 0:0.015 false true
## 内存信息
Memory used total max usage GC
heap 17M 37M 177M 10.01% gc.copy.count 16
tenured_gen 15M 25M 122M 12.65% gc.copy.time(ms) 86
eden_space 1M 10M 49M 2.58% 2
survivor_space 1M 1M 6M 16.46% gc.marksweepcompact.time 40
nonheap 28M 32M -1 87.93% (ms)
codeheap_'non-nmetho 1M 2M 5M 21.84%
ds'
## 运行时信息
Runtime
os.name Linux
os.version 4.15.0-70-generic
java.version 15-ea
输入Q
或者 Ctrl+C 可以退出 dashboard 命令。
本博客所有文章除特别声明外,均采用 CC BY-SA 3.0协议 。转载请注明出处!