阿里巴巴产品-arthas,JVM高性能调优工具

1、工具包下载:

   直接下载好zip包,放到一个目录,解压即可

   可以在官方文档给的路径下载

    链接:https://arthas.aliyun.com/doc/

2、本地IDEA起个Java死循环的进程:

import java.util.HashSet;
import java.util.Set;

import static java.lang.Thread.sleep;

public class Math {

    public static final  int num=100;
    public static String name="sddfefefffefefefefeffefefeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";

    public static void main(String[] args) {
        int a=1;
        int b=1;
        Math  math=new Math();
        int c=(math.add(a,b)+1)*10;
        Set<Math> map=new HashSet<>();
        while (true)
        {
            map.add(new Math());
            try {
                sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public  int add(int a, int b) {
        return a+b;
    }

}

3、进入arthas本地安装包,双击as脚本文件:

      脚本执行,会将当前机器下面JVM进程都会扫描出来,功能类似  手工执行JPS 

      选择需要检测的JVM进程:

进入检测工作台:

http://127.0.0.1:3658/

 在窗口命令行输入dashboard,可以查看线程以及运行时堆数据:

本篇博客仅仅是个入门,强大的功能点可以参考官方文档:https://arthas.aliyun.com/doc/quick-start.html

猜你喜欢

转载自blog.csdn.net/jason_jiahongfei/article/details/119620071