1、下载
# github下载 wget https://alibaba.github.io/arthas/arthas-boot.jar # 或者 Gitee 下载 wget https://arthas.gitee.io/arthas-boot.jar
2、快速使用
(1)需要排查的进程
ps -ef|grep ‘线程名‘
(2)进入arthas界面
java -jar arthas-boot.jar 53739
3、几个比较好用的命令
dashboard(系统看板):可以查看系统线程、jvm、gc情况,快速查看系统异常情况
快速定位系统死循环
thread -n 10:查找系统前10个耗cpu的线程
thread:查看所有线程
thread 线程号:查看线程堆栈
thread -b查看线程block情况
希望查看线上代码是否正确,可以使用jad反编译class,查看java代码
jad aiinterview.AudioSession
可以替代日志,快速查看问题
比如要查看某个map容器中的情况
原文:https://www.cnblogs.com/zhangchiblog/p/13231502.html