1.视频地址:
参考url:快速入门 | arthas
视频笔记:
2.arthas的安装:
下载并安装:
curl -O https://arthas.aliyun.com/arthas-boot.jar
java -jar arthas-boot.jar
启动会检测到机器上所有的java进程
选择需要的进程
3.常用命令
jad 类名
thread -n (thread -3)使用cpu最高的线程
thread x(thread 3)表示找到线上的堆栈
trace 可以使用arthas idea 插件
trace pagename xxx '#cost > 200'
watch 可以观察入参和出参
tt命令 可以记录某一段时间的调用,及进行回放
录制最近5次的接口:tt -t pagename xxx -n 5
回放某个id:tt -p -i 1000