diff --git a/README.md b/README.md index 7a8842c0b..57d63fa2d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Arthas was built to solve these issues. A developer can troubleshoot your produc * Monitor system metrics, thread states and cpu usage, gc statistics, and etc. * Supports command line interactive mode, with auto-complete feature enabled. * Supports telnet and websocket, which enables both local and remote diagnostics with command line and browsers. +* Supports profiler/Frame Graph * Supports JDK 6+. * Supports Linux/Mac/Windows. @@ -103,6 +104,8 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh #### Thread +* https://alibaba.github.io/arthas/en/thread + See what is eating your cpu (ranked by top cpu usage) and what is going on there in one glance: ```bash @@ -134,6 +137,8 @@ $ thread -n 3 #### jad +* https://alibaba.github.io/arthas/en/jad + Decompile your class with one shot: ```java @@ -172,6 +177,7 @@ public interface Servlet { ``` #### mc +* https://alibaba.github.io/arthas/en/mc Memory compiler, compiles `.java` files into `.class` files in memory. @@ -181,6 +187,8 @@ mc /tmp/Test.java #### redefine +* https://alibaba.github.io/arthas/en/redefine + Load the external `*.class` files to re-define the loaded classes in JVM. ```bash @@ -190,6 +198,8 @@ redefine -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class #### sc +* https://alibaba.github.io/arthas/en/sc + Search any loaded class with detailed information. ```bash @@ -226,6 +236,8 @@ $ sc -d org.springframework.web.context.support.XmlWebApplicationContext #### stack +* https://alibaba.github.io/arthas/en/stack + View the call stack of `test.arthas.TestStack#doGet`: ```bash @@ -261,12 +273,16 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr #### Trace +* https://alibaba.github.io/arthas/en/trace + See what is slowing down your method invocation with trace command: ![trace](site/src/site/sphinx/_static/trace.png) #### Watch +* https://alibaba.github.io/arthas/en/watch + Watch the first parameter and thrown exception of `test.arthas.TestWatch#doGet` only if it throws exception. ```bash @@ -281,6 +297,8 @@ ts=2018-09-18 10:26:28;result=@ArrayList[ #### Monitor +* https://alibaba.github.io/arthas/en/monitor + Monitor a specific method invocation statistics, including total number of invocations, average response time, success rate, and every 5 seconds: ```bash @@ -302,6 +320,8 @@ Affect(class-cnt:1 , method-cnt:1) cost in 109 ms. #### Time Tunnel(tt) +* https://alibaba.github.io/arthas/en/tt + Record method invocation data, so that you can check the method invocation parameters, returned value, and thrown exceptions later. It works as if you could come back and replay the past method invocation via time tunnel. ```bash @@ -323,6 +343,8 @@ Affect(class-cnt:1 , method-cnt:1) cost in 75 ms. #### Classloader +* https://alibaba.github.io/arthas/en/classloader + ```bash $ classloader name numberOfInstances loadedCountTotal @@ -345,6 +367,27 @@ $ classloader ![web console](site/src/site/sphinx/_static/web-console-local.png) +#### Profiler/FrameGraph + +* https://alibaba.github.io/arthas/en/profiler + +```bash +$ profiler start +Started [cpu] profiling +``` + +``` +$ profiler stop +profiler output file: /tmp/demo/arthas-output/20191125-135546.svg +OK +``` + +View profiler results under arthas-output via browser: + +![](site/src/site/sphinx/_static/arthas-output-svg.jpg) + + + ### Known Users Welcome to register the company name in this issue: https://github.com/alibaba/arthas/issues/111 (in order of registration) @@ -463,3 +506,4 @@ This project exists thanks to all the people who contribute. * [cli](https://github.com/eclipse-vertx/vert.x/tree/master/src/main/java/io/vertx/core/cli): Arthas's command line interface implementation is based on cli, open sourced by vert.x * [compiler](https://github.com/skalogs/SkaETL/tree/master/compiler) Arthas's memory compiler. * [Apache Commons Net](https://commons.apache.org/proper/commons-net/) Arthas's telnet client. +* [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) Arthas's profielr command. \ No newline at end of file diff --git a/README_CN.md b/README_CN.md index 0d7cd0efb..e0fb73b16 100644 --- a/README_CN.md +++ b/README_CN.md @@ -4,7 +4,7 @@ ![arthas](site/src/site/sphinx/arthas.png) -**Arthas 正在参加2019年度最受欢迎开源中国软件评选,请大家投票支持![查看](https://www.oschina.net/p/arthas)** +**Arthas 正在参加2019年度最受欢迎开源中国软件评选,急需大家宝贵的一票支持!![查看](https://www.oschina.net/p/arthas)** [![Build Status](https://travis-ci.org/alibaba/arthas.svg?branch=master)](https://travis-ci.org/alibaba/arthas) [![codecov](https://codecov.io/gh/alibaba/arthas/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/arthas) @@ -25,6 +25,7 @@ English version goes [here](README.md). 0. 线上遇到某个用户的数据处理有问题,但线上同样无法 debug,线下无法重现! 0. 是否有一个全局视角来查看系统的运行状况? 0. 有什么办法可以监控到JVM的实时运行状态? +0. 怎么快速定位应用的热点,生成火焰图? `Arthas`支持JDK 6+,支持Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的 `Tab` 自动补全功能,进一步方便进行问题的定位和诊断。 @@ -96,6 +97,8 @@ Gitee文档镜像: https://arthas.gitee.io/ #### Thread +* https://alibaba.github.io/arthas/thread + 一目了然的了解系统的状态,哪些线程比较占cpu?他们到底在做什么? ``` @@ -127,6 +130,8 @@ $ thread -n 3 #### jad +* https://alibaba.github.io/arthas/jad + 对类进行反编译: ```java @@ -165,6 +170,7 @@ public interface Servlet { ``` #### mc +* https://alibaba.github.io/arthas/mc Memory Compiler/内存编译器,编译`.java`文件生成`.class`。 @@ -173,6 +179,7 @@ mc /tmp/Test.java ``` #### redefine +* https://alibaba.github.io/arthas/redefine 加载外部的`.class`文件,redefine jvm已加载的类。 @@ -182,6 +189,7 @@ redefine -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class ``` #### sc +* https://alibaba.github.io/arthas/sc 查找JVM中已经加载的类 @@ -219,6 +227,8 @@ $ sc -d org.springframework.web.context.support.XmlWebApplicationContext #### stack +* https://alibaba.github.io/arthas/stack + 查看方法 `test.arthas.TestStack#doGet` 的调用堆栈: ```bash @@ -254,12 +264,16 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr #### Trace +* https://alibaba.github.io/arthas/trace + 观察方法执行的时候哪个子调用比较慢: ![trace](site/src/site/sphinx/_static/trace.png) #### Watch +* https://alibaba.github.io/arthas/watch + 观察方法 `test.arthas.TestWatch#doGet` 执行的入参,仅当方法抛出异常时才输出。 ```bash @@ -274,6 +288,8 @@ ts=2018-09-18 10:26:28;result=@ArrayList[ #### Monitor +* https://alibaba.github.io/arthas/monitor + 监控某个特殊方法的调用统计数据,包括总调用次数,平均rt,成功率等信息,每隔5秒输出一次。 @@ -296,6 +312,8 @@ Affect(class-cnt:1 , method-cnt:1) cost in 109 ms. #### Time Tunnel(tt) +* https://alibaba.github.io/arthas/tt + 记录方法调用信息,支持事后查看方法调用的参数,返回值,抛出的异常等信息,仿佛穿越时空隧道回到调用现场一般。 ```bash @@ -317,6 +335,8 @@ Affect(class-cnt:1 , method-cnt:1) cost in 75 ms. #### Classloader +* https://alibaba.github.io/arthas/classloader + 了解当前系统中有多少类加载器,以及每个加载器加载的类数量,帮助您判断是否有类加载器泄露。 ```bash @@ -340,6 +360,24 @@ $ classloader ![web console](site/src/site/sphinx/_static/web-console-local.png) +#### Profiler/FrameGraph/火焰图 + +* https://alibaba.github.io/arthas/profiler + +```bash +$ profiler start +Started [cpu] profiling +``` + +``` +$ profiler stop +profiler output file: /tmp/demo/arthas-output/20191125-135546.svg +OK +``` + +通过浏览器查看profiler结果: + +![](site/src/site/sphinx/_static/arthas-output-svg.jpg) ### Known Users @@ -459,6 +497,7 @@ $ classloader * [cli](https://github.com/eclipse-vertx/vert.x/tree/master/src/main/java/io/vertx/core/cli): Arthas的命令行界面基于vert.x提供的cli库进行开发,感谢vert.x在这方面做的优秀工作。 * [compiler](https://github.com/skalogs/SkaETL/tree/master/compiler) Arthas里的内存编绎器代码来源 * [Apache Commons Net](https://commons.apache.org/proper/commons-net/) Arthas里的Telnet Client代码来源 +* [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) Arthas's profielr 命令. ### 仓库镜像 diff --git a/site/src/site/sphinx/en/index.md b/site/src/site/sphinx/en/index.md index 5c637449f..71ae0f87b 100644 --- a/site/src/site/sphinx/en/index.md +++ b/site/src/site/sphinx/en/index.md @@ -29,6 +29,7 @@ Arthas is built to solve these issues. A developer can troubleshoot production i * Monitor system metrics, thread states and CPU usage, GC statistics and etc. * Supports command line interactive mode, with auto-complete feature enabled. * Supports telnet and WebSocket, which enables both local and remote diagnostics with command line and browsers. +* Supports profiler/Frame Graph * Supports JDK 6+ * Supports Linux/Mac/Windows diff --git a/site/src/site/sphinx/index.md b/site/src/site/sphinx/index.md index 69e8d00b8..9e1194927 100644 --- a/site/src/site/sphinx/index.md +++ b/site/src/site/sphinx/index.md @@ -7,7 +7,7 @@ Arthas 用户文档 ![](arthas.png) -**Arthas 正在参加2019年度最受欢迎开源中国软件评选,请大家投票支持![查看](https://www.oschina.net/p/arthas)** +**Arthas 正在参加2019年度最受欢迎开源中国软件评选,急需大家宝贵的一票支持!![查看](https://www.oschina.net/p/arthas)** `Arthas` 是Alibaba开源的Java诊断工具,深受开发者喜爱。 @@ -19,6 +19,7 @@ Arthas 用户文档 0. 线上遇到某个用户的数据处理有问题,但线上同样无法 debug,线下无法重现! 0. 是否有一个全局视角来查看系统的运行状况? 0. 有什么办法可以监控到JVM的实时运行状态? +0. 怎么快速定位应用的热点,生成火焰图? `Arthas`支持JDK 6+,支持Linux/Mac/Winodws,采用命令行交互模式,同时提供丰富的 `Tab` 自动补全功能,进一步方便进行问题的定位和诊断。 @@ -26,7 +27,7 @@ Arthas 用户文档 Contents -------- -* [最受欢迎开源中国软件评选](https://www.oschina.net/p/arthas) +* [请大家投宝贵的一票支持](https://www.oschina.net/p/arthas) * [English Docs](https://alibaba.github.io/arthas/en/) * [在线教程(推荐)](https://alibaba.github.io/arthas/arthas-tutorials?language=cn) * [安装](install-detail.md)