赞
踩
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
##基础镜像 1.java -jar /opt/arthas/arthas-boot.jar ## help help ## 查看dashboard dashboard 回车 ## 查看线程1 thread 1 ## 反编译class jad demo.MathGame ## 可以通过 sc 命令来查找JVM里已加载的类 sc -d *MathGame ## 查看函数返回 watch -h watch demo.MathGame primeFactors params watch demo.MathGame primeFactors returnObj watch demo.MathGame primeFactors '{params, target, returnObj}' -x 2 watch *StringUtils isBlank params '#cost>100'
排查应用请求响应慢,锁等待,异常线程定位
thread -help
thread -n -1 The number of thread(s) to show, ordered by cpu utilization, -1 to show all
thread id 查看指定线程堆栈
thread -b Find the thread who is holding a lock that blocks the most number of threads.
thread -i Specify the sampling interval (in ms) when calculating cpu usage.
1.确定耗时节点 、2.通过方法执行实际调用路径
trace demo.MathGame primeFactors
查看方法的调用链
stack demo.MathGame primeFactors -n 5 '1==1'
查看方法的调用记录 并对异常记录进行查看
tt -t demo.MathGame primeFactors
tt -i index 指定查看 index为第一步报错的序列
1.指定代码改动是否提交 2.查看代码源码
1.查看方法入参和出参
1.使用手册 https://www.yuque.com/arthas-idea-plugin/help
java -jar /opt/arthas/arthas-client.jar 127.0.0.1 3658 -c “stop”
https://arthas.aliyun.com/doc/docker.html
https://blog.csdn.net/zhang_jiayuan/article/details/109261904
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。