Install Arthas

简介: Arthas 是一款线上监控诊断产品,通过全局视角实时查看应用 load、内存、gc、线程的状态信息,并能在不修改应用代码的情况下,对业务问题进行诊断,包括查看方法调用的出入参、异常,监测方法执行耗时,类加载信息等,大大提升线上问题排查效率。

前言

image (6).png
Arthas 是一款线上监控诊断产品,通过全局视角实时查看应用 load、内存、gc、线程的状态信息,并能在不修改应用代码的情况下,对业务问题进行诊断,包括查看方法调用的出入参、异常,监测方法执行耗时,类加载信息等,大大提升线上问题排查效率。

Arthas Idea Plugin

image.png

Install

大家在本地安装的时候,可以通过官方文档:https://arthas.aliyun.com/doc/quick-start.html来进行安装,还有一种途径就是通过上文所述的Arthas Idea Plugin,来进行安装,插件中的命令生成方便执行与装,在本地环境执行一个命令以后随时都可以使用,而且arthas 支持自动更新最新版本的,对于使用没有影响。使用起来比较方便。
image.png

生成的命令如下:
curl -sk https://arthas.aliyun.com/arthas-boot.jar -o ~/.arthas-boot.jar  && echo "alias as.sh='java -jar ~/.arthas-boot.jar --repo-mirror aliyun --use-http 2>&1'" >> ~/.bashrc && source ~/.bashrc && echo "source ~/.bashrc" >> ~/.bash_profile && source ~/.bash_profile
AI 代码解读
执行命令:
duansg@DuansiguodeMacBook-Pro ~ % curl -sk https://arthas.aliyun.com/arthas-boot.jar -o ~/.arthas-boot.jar  && echo "alias as.sh='java -jar ~/.arthas-boot.jar --repo-mirror aliyun --use-http 2>&1'" >> ~/.bashrc && source ~/.bashrc && echo "source ~/.bashrc" >> ~/.bash_profile && source ~/.bash_profile
AI 代码解读
启动arthas
duansg@DuansiguodeMacBook-Pro ~ % java -jar ~/.arthas-boot.jar
AI 代码解读
duansg@DuansiguodeMacBook-Pro ~ % java -jar ~/.arthas-boot.jar
[INFO] JAVA_HOME: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre
[INFO] arthas-boot version: 3.6.7
[INFO] Process 34725 already using port 3658
[INFO] Process 34725 already using port 8563
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 34725
AI 代码解读
选择需要选择应用 java 进程:如1,它会打印java进程列表
1
[INFO] arthas home: /Users/duansg/.arthas/lib/3.6.7/arthas
[INFO] The target process already listen port 3658, skip attach.
[INFO] arthas-client connect 127.0.0.1 3658
  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
 /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'

wiki       https://arthas.aliyun.com/doc
tutorials  https://arthas.aliyun.com/doc/arthas-tutorials.html
version    3.6.7
main_class
pid        34725
time       2022-11-27 15:17:54

[arthas@34725]$
AI 代码解读
至此,就可以进行arthas命令的输入了。
目录
打赏
0
0
0
0
569
分享
相关文章
安装
安装
131 0
安装
WinDriver 安装
WinDriver 安装
173 0
buildx 安装
buildx 安装
842 0
fsarchiver安装及使用
fsarchiver安装及使用
688 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等