arthas使用

arthas中文文档

https://github.com/alibaba/arthas/blob/master/README_CN.md

1、下载并启动

curl -O https://arthas.aliyun.com/arthas-boot.jar
java -jar arthas-boot.jar

2、选择java进程

[INFO] JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
[INFO] arthas-boot version: 3.7.2
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 56740 org.jetbrains.jps.cmdline.Launcher
  [2]: 551 
  [3]: 55176 com.intellij.idea.Main
  [4]: 54649 com.XXX.XXX.XXX.XXXApplication
  [5]: 54474

输入

4

3、dashboard

查看jvm进程信息

[arthas@57016]$ dashboard

4、查看指定线程信息

thread pid

5、使用jad查看源码

[arthas@57016]$ jad com.XXX.XXX.XXX.XXX.service.XXXServiceImpl

6、查看指定方法返回值

watch 类全路径 方法名 returnObj

7、启动分析器

[arthas@57016]$ profiler start
Profiling started
[arthas@57016]$ profiler stop
OK
profiler output file: /User/businessProjects/xxx/arthas-output/20240513-190211.html

打开指定路径下的html

posted @   使用D  阅读(105)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示