开源在线分析诊断工具Arthas(阿尔萨斯)--总结

阿里重磅开源在线分析诊断工具Arthas(阿尔萨斯)

arthas用法
启动demo java -jar arthas-demo.jar
启动 java -jar arthas-boot.jar
attach 目标进程 输入2,再输入回车/enter。
dashboard 显示进程信息
thread 1  //会打印线程ID 1的栈,通常是main函数的线程。
jad demo.MathGame  //反编译Main Class
 watch demo.MathGame primeFactors returnObj  //查看demo.MathGame#primeFactors函数的返回值:
 quit或者exit  //退出
 
class/classloader相关
sc demo.*   //模糊搜索
sc -d -f demo.MathGame  //打印出类的Field信息
jad --source-only demo.MathGame   //反编绎时只显示源代码
 jad demo.MathGame main //反编译指定函数
打开日志记录功能
 options save-result true
日志路径
{user.home}/logs/arthas-cache/result.log, 

 

posted on 2019-04-29 10:01  tigerloveapple  阅读(1231)  评论(0编辑  收藏  举报