阿里Arthas(阿尔赛斯)-java诊断工具使用入门

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

1.下载官方测试程序启动

[doda@host166 game]$curl -O https://arthas.aliyun.com/math-game.jar
[doda@host166 game]$ java -jar math-game.jar

2.下载Arthas启动包,启动Arthas

[doda@host166 arthas]$curl -O https://arthas.aliyun.com/math-game.jar
[doda@host166 arthas]$ java -jar arthas-boot.jar

[ERROR] Can not read maven-metadata.xml from: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packa              ging/maven-metadata.xml
[ERROR] Can not find Arthas under local: /root/.arthas/lib and remote maven repo mirror: aliyun
[ERROR] Unable to download arthas from remote server, please download the full package according to wiki: https://githu            b.com/alibaba/arthas

上面报错是因为不能连网,Arthas不能下载相关依赖,我们去官网下载完整.zip解压启动即可:

https://github.com/alibaba/arthas/releases

 下载解压:
[doda@host166 arthas]$ unzip arthas-bin.zip 
[doda@host166 arthas]$ ll
total 26812
-rw-r--r-- 1 doda doda     8449 Sep 27  2020 arthas-agent.jar
-rw-rw-r-- 1 doda doda 13519028 May 14 23:34 arthas-bin.zip
-rw-r--r-- 1 doda doda   141887 Sep 27  2020 arthas-boot.jar
-rw-r--r-- 1 doda doda   430939 Sep 27  2020 arthas-client.jar
-rw-r--r-- 1 doda doda 13266535 Sep 27  2020 arthas-core.jar
-rw-r--r-- 1 doda doda      531 Sep 27  2020 arthas.properties
-rw-r--r-- 1 doda doda     5436 Sep 27  2020 arthas-spy.jar
-rwxr-xr-x 1 doda doda     3113 Sep 27  2020 as.bat
-rwxr-xr-x 1 doda doda     7744 Sep 27  2020 as-service.bat
-rwxr-xr-x 1 doda doda    33257 Sep 27  2020 as.sh
drwxr-xr-x 2 doda doda      113 Sep 27  2020 async-profiler
drwxrwxr-x 2 doda doda       27 May 15 00:07 game
-rwxr-xr-x 1 doda doda      635 Sep 27  2020 install-local.sh
drwxr-xr-x 2 doda doda      108 Sep 27  2020 lib
-rw-r--r-- 1 doda doda     2020 Sep 27  2020 logback.xml
-rw-r--r-- 1 doda doda     4482 Sep 27  2020 math-game.jar

执行用启动命令,选择进程对应数字,回车确认,显示arthas用户,即登陆进arthas操作界面
[doda@host166 arthas]$ java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.6.1
[INFO] Process 303962 already using port 3658
[INFO] Process 303962 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]: 303962 org.apache.spark.deploy.SparkSubmit
  [2]: 310993 math-game.jar
  [3]: 316194 org.elasticsearch.bootstrap.Elasticsearch
  [4]: 105913 smart-spark-1.0.jar
1
[INFO] arthas home: /home/doda/shangeshishi/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.1                                                                
main_class                                                                      
pid        303962                                                               
time       2022-05-15 00:25:19                                                  

[arthas@303962]$ 

退出当前 Arthas 客户端,其他 Arthas 客户端不受影响(quit)
[arthas@303962]$ quit

关闭 Arthas 服务端,所有 Arthas 客户端全部退出(stop)
[doda@host166 arthas]$ stop

3.Arthas常场景使用

3.1查看当前系统的实时数据面板

[arthas@303962]$ dashboard 

ID: Java级别的线程ID,注意这个ID不能跟jstack中的nativeID一一对应。
NAME: 线程名
GROUP: 线程组名
PRIORITY: 线程优先级, 1~10之间的数字,越大表示优先级越高
STATE: 线程的状态
CPU%: 线程的cpu使用率。比如采样间隔1000ms,某个线程的增量cpu时间为100ms,则cpu使用率=100/1000=10%
DELTA_TIME: 上次采样之后线程运行增量CPU时间,数据格式为秒
TIME: 线程运行总CPU时间,数据格式为分:秒
INTERRUPTED: 线程当前的中断位状态
DAEMON: 是否是daemon线程

3.2Thread命令

3.2.1通过thread命令来获取到math-game进程的Main Class

thread 1会打印线程ID 1的栈,通常是main函数的线程。
[arthas@310993]$ thread 1 | grep 'main('
    at demo.MathGame.main(MathGame.java:17)

3.2.2例如使用 -n ,显示几条线程信息,根据cpu使用率排序

[arthas@310993]$ thread -n 3
"arthas-command-execute" Id=32 cpuUsage=0.48% deltaTime=0ms time=1008ms RUNNABLE
    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:448)
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:206)
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)


"C1 CompilerThread12" [Internal] cpuUsage=0.46% deltaTime=0ms time=544ms


"C1 CompilerThread10" [Internal] cpuUsage=0.2% deltaTime=0ms time=571ms

3.3通过jad来反编译Main Class

[arthas@310993]$ jad demo.MathGame

ClassLoader:                                                                                                                                                            
+-sun.misc.Launcher$AppClassLoader@3d4eac69                                                                                                                             
  +-sun.misc.Launcher$ExtClassLoader@43a024e5                                                                                                                           

Location:                                                                                                                                                               
/home/doda/shangeshishi/arthas/game/math-game.jar                                                                                                                       

       /*
        * Decompiled with CFR.
        */
       package demo;
       
       import java.util.ArrayList;
       import java.util.List;
       import java.util.Random;
       import java.util.concurrent.TimeUnit;
       
       public class MathGame {
           private static Random random = new Random();
           private int illegalArgumentCount = 0;
       
           public List<Integer> primeFactors(int number) {
/*44*/         if (number < 2) {
/*45*/             ++this.illegalArgumentCount;
                   throw new IllegalArgumentException("number is: " + number + ", need >= 2");
               }
               ArrayList<Integer> result = new ArrayList<Integer>();
/*50*/         int i = 2;
/*51*/         while (i <= number) {
/*52*/             if (number % i == 0) {
/*53*/                 result.add(i);
/*54*/                 number /= i;
/*55*/                 i = 2;
                       continue;
                   }
/*57*/             ++i;
               }
/*61*/         return result;
           }
       
           public static void main(String[] args) throws InterruptedException {
               MathGame game = new MathGame();
               while (true) {
/*16*/             game.run();
/*17*/             TimeUnit.SECONDS.sleep(1L);
               }
           }
       
           public void run() throws InterruptedException {
               try {
/*23*/             int number = random.nextInt() / 10000;
/*24*/             List<Integer> primeFactors = this.primeFactors(number);
/*25*/             MathGame.print(number, primeFactors);
               }
               catch (Exception e) {
/*28*/             System.out.println(String.format("illegalArgumentCount:%3d, ", this.illegalArgumentCount) + e.getMessage());
               }
           }
       
           public static void print(int number, List<Integer> primeFactors) {
               StringBuffer sb = new StringBuffer(number + "=");
/*34*/         for (int factor : primeFactors) {
/*35*/             sb.append(factor).append('*');
               }
/*37*/         if (sb.charAt(sb.length() - 1) == '*') {
/*38*/             sb.deleteCharAt(sb.length() - 1);
               }
/*40*/         System.out.println(sb);
           }
       }

Affect(row-cnt:1) cost in 1253 ms.

3.4通过watch查看函数返回

参数名称                  参数说明
class-pattern           类名表达式匹配
method-pattern           函数名表达式匹配
express                   观察表达式,默认值:{params, target, returnObj}
condition-express       条件表达式
[b]                       在函数调用之前观察
[e]                       在函数异常之后观察
[s]                       在函数返回之后观察
[f]                       在函数结束之后(正常返回和异常返回)观察
[E]                       开启正则表达式匹配,默认为通配符匹配
[x:]                   指定输出结果的属性遍历深度,默认为 1,最大值是4

这里重点要说明的是观察表达式,观察表达式的构成主要由 ognl 表达式组成,所以你可以这样写"{params,returnObj}",只要是一个合法的 ognl 表达式,都能被正常支持,详见:OGNL - Apache Commons OGNL - Language Guide

3.4.1通过watch命令来查看demo.MathGame#primeFactors函数的返回值

       观察表达式,默认值是{params, target, returnObj},即:观察函数调用返回时的参数、this对象和返回值
[arthas@310993]$ watch demo.MathGame primeFactors -x 2
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 41 ms, listenerId: 14
method=demo.MathGame.primeFactors location=AtExit
ts=2022-05-15 01:47:50; [cost=0.98552ms] result=@ArrayList[
    @Object[][
        @Integer[1],
    ],
    @MathGame[
        random=@Random[java.util.Random@4d405ef7],
        illegalArgumentCount=@Integer[2709],
    ],
    @ArrayList[
        @Integer[12343],
    ],
]
method=demo.MathGame.primeFactors location=AtExceptionExit
ts=2022-05-15 01:47:51; [cost=0.350333ms] result=@ArrayList[
    @Object[][
        @Integer[-147433],
    ],
    @MathGame[
        random=@Random[java.util.Random@4d405ef7],
        illegalArgumentCount=@Integer[2710],
    ],
    null,
]

       上面的结果里,说明函数被执行了两次,第一次结果是location=AtExceptionExit,说明函数抛出异常了,因此returnObj是null
       在第二次结果里是location=AtExit,说明函数正常返回,因此可以看到returnObj结果是一个ArrayList 

3.4.2调整-x的值,观察具体的函数参数值

[arthas@310993]$ watch demo.MathGame primeFactors "{params,target}" -x 3
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 57 ms, listenerId: 15
method=demo.MathGame.primeFactors location=AtExceptionExit
ts=2022-05-15 01:50:56; [cost=0.357649ms] result=@ArrayList[
    @Object[][
        @Integer[-11884],
    ],
    @MathGame[
        random=@Random[
            serialVersionUID=@Long[3905348978240129619],
            seed=@AtomicLong[273686037247930],
            multiplier=@Long[25214903917],
            addend=@Long[11],
            mask=@Long[281474976710655],
            DOUBLE_UNIT=@Double[1.1102230246251565E-16],
            BadBound=@String[bound must be positive],
            BadRange=@String[bound must be greater than origin],
            BadSize=@String[size must be non-negative],
            seedUniquifier=@AtomicLong[-3282039941672302964],
            nextNextGaussian=@Double[0.0],
            haveNextNextGaussian=@Boolean[false],
            serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
            unsafe=@Unsafe[sun.misc.Unsafe@c4437c4],
            seedOffset=@Long[24],
        ],
        illegalArgumentCount=@Integer[2808],
    ],
]

-x表示遍历深度,可以调整来打印具体的参数和结果内容,默认值是1。
-x最大值是4,防止展开结果占用太多内存。用户可以在ognl表达式里指定更具体的field。

3.4.3观察异常信息的例子

[arthas@310993]$ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 38 ms, listenerId: 16
method=demo.MathGame.primeFactors location=AtExceptionExit
ts=2022-05-15 01:52:23; [cost=0.319735ms] result=@ArrayList[
    @Integer[-199542],
    java.lang.IllegalArgumentException: number is: -199542, need >= 2
        at demo.MathGame.primeFactors(MathGame.java:46)
        at demo.MathGame.run(MathGame.java:24)
        at demo.MathGame.main(MathGame.java:16)
,
]

-e表示抛出异常时才触发
express中,表示异常信息的变量是throwExp

3.4.4观察当前对象中的属性

如果想查看函数运行前后,当前对象中的属性,可以使用target关键字,代表当前对象

[arthas@310993]$ watch demo.MathGame primeFactors 'target'
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 39 ms, listenerId: 17
method=demo.MathGame.primeFactors location=AtExit
ts=2022-05-15 01:53:41; [cost=1.306179ms] result=@MathGame[
    random=@Random[java.util.Random@4d405ef7],
    illegalArgumentCount=@Integer[2885],
]

3.4.5然后使用target.field_name访问当前对象的某个属性

[arthas@310993]$ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 41 ms, listenerId: 19
method=demo.MathGame.primeFactors location=AtExit
ts=2022-05-15 01:55:26; [cost=1.22408ms] result=@Integer[2931]

Arthas(阿尔萨斯):Java性能优化分析的终极利器 Arthas是一款线上Java诊断工具,能实时监控应用负载、内存、GC等状态,无需修改代码即可排查问题。主要功能包括方法调用追踪、耗时分析、类加载检查等,适用于解决类加载异常、代码未生效、线上debug等常见问题。安装简单,只需下载jar包并运行。实战演示中,通过trace命令快速定位到Spring Boot接口的慢方法(模拟的Thread.sleep)。其它实用功能包括watch监控参数、jad反编译等。Arthas作为零侵入、功能强大的性能分析工具,能显著提升问题排查效率,建议Java开发者掌握使用。 阅读详情

相关推荐

arthas的源码,如果在github上无法下载的同学可通过我这里下载

arthas的源码,如果在github上无法下载的同学可通过我这里下载 想学习arthas这个线上诊断神器的小伙伴,可以下载源吗学习

arthas 环境部署指导

将arthas的文件夹权限设为777 : chmod 777 arthas 切换到普通用户,设置java 环境变量 . java -jar arthas-boot.jar

what_ever_so_what的专栏 3273

FPGA之串口收发字符串之(四)——串口屏USART_HMI介绍

之前对串口各模块的设计都做了相关介绍。这里介绍串口屏的相关知识。 本次项目使用的串口屏型号是陶晶驰串口屏TJC3224T024_011,这个型号的串口屏的资料在官网可以找到。本文抛转引玉,简单介绍以便在本工程中更好的应用。 下图是该串口屏的实物图: 一般地,使用单片机或者嵌入式MCU控制串口屏,都会用到串口,同样地,在FPGA中实现也是类似,不过稍微复杂,具体代码设计过程中有以下问题需要...

隔壁old余的博客 7496

Arthas - Can not read arthas version from: https://arthas.aliyun.com/api/latest_version

Arthas - Can not read arthas version from: https://arthas.aliyun.com/api/latest_version

3911

保姆级教程:用STM32H743+TJA1042T玩转FDCAN,CubeMX配置1M/5M双速率通信(附完整代码)

本文提供STM32H743与TJA1042T实现FDCAN双速率通信的保姆级教程,详细讲解CubeMX配置1M/5M双速率通信的全过程,包括硬件连接、时钟树配置、过滤器设置及中断管理,并附完整代码示例,助力开发者快速掌握FDCAN高速通信技术。

weixin_30698297的博客 475

用示波器抓一次MIPI D-PHY的波形,手把手教你读懂HS模式和LP模式的切换时序

本文详细解析了MIPI D-PHY信号的双模切换机制,包括高速模式(HS)和低功耗模式(LP)的波形捕获与诊断技巧。通过示波器设置、关键状态分析和实战案例,帮助工程师快速定位信号完整性问题,提升调试效率。

weixin_30696427的博客 461

java诊断工具-Arthas(阿尔赛斯)入门

Arthas是什么? Arthas 是Alibaba开源的Java诊断工具。 当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决: 这个类从哪个 jar 包加载的?为什么会报各种类相关的 Exception? 我改的代码为什么没有执行到?难道是我没 commit?分支搞错了? 遇到问题无法在线上 debug,难道只能通过加日志再重新发布吗? 线上遇到某个用户的数据处理有问题,但线上同样无法 debug,线下无法重现! 是否有一个全局视角来查看系统的运.

qaws9403的博客 771

小案例:利用图床自动化批量上传图片并获取图片链接

用python爬虫写了一个小脚本,用来自动上传图片到图床,然后返回链接,我们只需直接复制链接就可以。(需要安装Requests库) 因为不同图床需要提交的POST表单不一致,所以在这里我用ImgURL图床做示范,如果大家有需求,可自行修改代码。使用脚本的时候,我们只需把需要上传的图片和这个脚本放在同一个文件夹中,然后运行脚本,稍作等待,看到提示时就可以在脚本运行文件夹中发现一个名为“图片链接地址.txt”的文件,里面就是图片链接啦! 四、图片链接地址.txt(单张图片):...

采菊东篱下,Python满乾坤! 4415

查看某程序的日志命令_手把手教你使用Arthas的trace命令排查线上服务平均响应时间太长问题...

你知道的越多,不知道的就越多,业余的像一棵小草!你来,我们一起精进!你不来,我和你的竞争对手一起精进!编辑:业余草来源:suo.im/5XtQMD推荐:https://www.xttblog.com/?p=5112前言最近线上环境某个接口服务响应时间偏长,导致用户体验超差,那平时该怎么快速的排查这类问题呢?为代码添加上详细的打印日志;不建议,一是线上环境,没法随便的重新部署更换了详细日志...

weixin_39916379的博客 792

windows sever2019切换Linux内核

安装docker engine后,内核是windows,很多镜像都无法安装使用。 一,在https://github.com/linuxkit/lcow/release 下载最新版本release.zip,我使用了如下版本。 二,新建文件夹C:\Program Files\Linux Containers ,把release.zip(不要解压)放入此文件夹 三,编辑docker配置文件( C:\ProgramData\docker\config\daemon.json) ,电脑中没有该文件,新建一

记录日常疑问 3875

【OpenCV】第二十三章: 图像特征检测之SURF、FAST、BRIEF、OBR算法

4、由于在检测特征点时是需要对图像中所有的像素点进行检测,然而图像中的绝大多数点都不是特征点,如果对每个像素点都进行上述的检测过程,那显然是种浪费,所以FAST采用一种进行非特征点判别的方法:首先对候选点的周围90度的点(1,9,5,13)四个点进行测试,而且是先测试1和9,如果它们两个符合阈值要求再测试5和13。继SIFT和SURF后,大家在特征点检测的速度上又进行了很多的改进尝试,但速度的提升效果都不是非常明显,直到FAST算法诞生,特征点检测的速度才有了一个质的飞跃。无法计算描述符的特征点将被删除。

因为热爱所以坚持 2159

极简java性能监控工具-arthas(阿尔萨斯)

极简java程序性能监控工具-arthas,帮你快速分析解决线上生产问题!!!

码农佩奇,一个热爱生活的程序猿! 9575

OpenClaw 保姆级 window部署

OpenClaw 保姆级 window部署 养龙虾

cs821984831的博客 299

Java 诊断利器 Arthas使用

Arthas是一款阿里巴巴开源的 Java 线上诊断工具,功能非常强大,可以解决很多线上不方便解决的问题。Arthas诊断使用的是命令行交互模式,支持JDK6+,Linux、Mac、Windows 操作系统,命令还支持使用tab键对各种信息的,诊断起来非常利索。Arthas(阿尔萨斯)能为你做什么?Arthas 是 Alibaba 开源的 Java 诊断工具,深受开发者喜爱。当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决:这个类从哪个 jar 包加载的?

程序员一博 4719

华为OD机试新系统真题-魔法咒语组合(Java/Py/C++/Go/C/Js)

华为OD机试 新系统真题【魔法咒语组合】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【魔法咒语组合】多语言题解

qq_45776114的博客 671

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

java诊断神器 arthas(阿尔萨斯)

java诊断神器 arthas(阿尔萨斯) 官网地址:https://arthas.aliyun.com/doc/en/index.html 1、快速开始 1.1、windows版本安装 # 命令行输入 curl -0 https://arthas.aliyun.com/arthas-boot.jar --output arthas-boot.jar # 启动arthas 注意:启动前已经要有java进程运行,否则无法进入 java -jar arthas-boot.jar --telnet-por

1853 1万+

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

Java热排障|Arthas(阿尔萨斯)Java诊断工具全解析

Arthas(阿尔萨斯)是一款由阿里巴巴开源的Java诊断工具,旨在为Java开发者提供一套实时、非侵入性的应用监控和调试方案。它能够在不重启应用的情况下,帮助开发者深入了解和诊断正在运行的Java应用程序的状态,从而有效提高问题定位的效率和准确性。

weixin_44435110的博客 3641

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

【Arthas】 启动报错解决方案 Can not read arthas version from......

下载arthas全量包之后,启动发现报了个这个错,上网上找了一圈发现这个问题解决方案在我这都不好使,最后找到原因了。

ctttttttthllh的博客 1013

阿里 Arthas (阿尔萨斯)工具的使用

结论:arthas 可以通过启动时指定不同的端口来监听不同的java程序,每次如果采用exit或者quit退出,都会保留实例,下次可以通过指定上次相同的端口,进入同一个实例,但是进入同一个实例,只能再次监听同一个java程序,不能使用同一个实例两次监听不同的程序,会报错端口冲突,告诉你三种解决办法;③通过java -jar arthas-boot.jar再次进入,因为没有指定监听的端口号,所以跟上一次共用的同一个session,也就是监听的25985的进程。③再次查看3658端口占用情况,发现未被占用了;

java领域分享 4802

Java 诊断神器:Arthas

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

运维仙人 773

Arthas(阿尔萨斯)使用

Arthas 是Alibaba开源的Java诊断工具。安装在系统所在服务器。可以帮助开发人员或者运维人员查找问题,分析性能,bug追踪。开源地址:https://github.com/alibaba/arthas官方文档:https://alibaba.github.io/arthas。

皮球 4011

Arthas(阿尔萨斯)

Arthas(阿尔萨斯)是阿里巴巴开源的一款 Java 在线诊断工具,基于 Java Agent 和字节码增强技术实现。它无需重启 JVM,即可动态追踪代码执行、实时查看 JVM 状态、修改代码逻辑,是生产环境问题排查的“瑞士军刀”。

初入江湖,多多关照 1728

Arthas 排查JAVA应用问题 —— 筑梦之路

Arthas是阿里开源的一款 Java 应用诊断工具,可以在线排查问题,动态跟踪 Java 代码,以及实时监控 JVM 状态。

筑梦之路 1919

arthas 安装部署

什么是Arthas(阿尔萨斯)? Arthas是Alibaba开源的Java诊断工具。支持Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的Tab自动补全功能,进一步方便进行问题的定位和诊断。 Arthas的用途? 当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决: 这个类从哪个 jar 包加载的?为什么会报各种类相关的 Exception? 我改的代码为什么没有执行到?难道是我没 commit?分支搞错了? 遇到问题无法在线上 debu..

sunnyJam的专栏 1263

Arthas(阿尔萨斯)监控线上Java程序,解决无法线上性能调优问题

1、Arthas介绍 Arthas是阿里在2018年9月开源的Java诊断工具,支持 JDK6+,采用的是命令交互模式,提供Tab 自动补全,在线排查问题,无需重启,动态跟踪Java代码,实时监控JVM状态,方便Java大佬们定位和诊断线上程序运行问题。 开源地址:https://github.com/alibaba/arthas 官方文档:https://arthas.aliyun.com/doc/ 2、Arthas使用场景(解决的问题) 1、可以全局视角来查看系统的运行...

HemingwayM的博客 4619

阿里arthas(阿尔萨斯)简介

​阿里 ​。

zwh1zwh的博客 1946
上一篇: IDEA生成项目maven-tree依赖目录树结构
下一篇: 阿里Arthas(阿尔赛斯)不停机替换class进行热部署
SimpleSimpleSimples
博客等级 码龄10年 6451粉丝 115原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值