mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
update doc
This commit is contained in:
1 parent
260e7e604e
commit
cae1e0b308
4 files changed
+63
-17
No files matched your search
+30
-8
@@ -27,9 +27,14 @@ English version goes [here](README.md).
|
||||
`Arthas`支持JDK 6+,支持Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的 `Tab` 自动补全功能,进一步方便进行问题的定位和诊断。
|
||||
|
||||
|
||||
### 在线教程(推荐)
|
||||
|
||||
* [基础教程](https://alibaba.github.io/arthas/arthas-tutorials?language=cn&id=arthas-basics)
|
||||
* [进阶教程](https://alibaba.github.io/arthas/arthas-tutorials?language=cn&id=arthas-advanced)
|
||||
|
||||
### 快速开始
|
||||
|
||||
#### 使用`arthas-boot`(推荐)
|
||||
#### 使用`arthas-boot`(推荐)
|
||||
|
||||
下载`arthas-boot.jar`,然后用`java -jar`的方式启动:
|
||||
|
||||
@@ -60,9 +65,9 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
|
||||
也可以执行`./as.sh -h`来获取更多参数信息。
|
||||
|
||||
|
||||
### 文档
|
||||
|
||||
* [在线教程(推荐)](https://alibaba.github.io/arthas/arthas-tutorials?language=cn)
|
||||
* [用户文档](https://alibaba.github.io/arthas/)
|
||||
* [安装](https://alibaba.github.io/arthas/install-detail.html)
|
||||
* [快速入门](https://alibaba.github.io/arthas/quick-start.html)
|
||||
@@ -155,11 +160,28 @@ public interface Servlet {
|
||||
}
|
||||
```
|
||||
|
||||
#### mc
|
||||
|
||||
Memory Compiler/内存编译器,编译`.java`文件生成`.class`。
|
||||
|
||||
```bash
|
||||
mc /tmp/Test.java
|
||||
```
|
||||
|
||||
#### redefine
|
||||
|
||||
加载外部的`.class`文件,redefine jvm已加载的类。
|
||||
|
||||
```bash
|
||||
redefine /tmp/Test.class
|
||||
redefine -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class
|
||||
```
|
||||
|
||||
#### sc
|
||||
|
||||
查找JVM中已经加载的类
|
||||
|
||||
```
|
||||
```bash
|
||||
$ sc -d org.springframework.web.context.support.XmlWebApplicationContext
|
||||
class-info org.springframework.web.context.support.XmlWebApplicationContext
|
||||
code-source /Users/xxx/work/test/WEB-INF/lib/spring-web-3.2.11.RELEASE.jar
|
||||
@@ -195,7 +217,7 @@ $ sc -d org.springframework.web.context.support.XmlWebApplicationContext
|
||||
|
||||
查看方法 `test.arthas.TestStack#doGet` 的调用堆栈:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ stack test.arthas.TestStack doGet
|
||||
Press Ctrl+C to abort.
|
||||
Affect(class-cnt:1 , method-cnt:1) cost in 286 ms.
|
||||
@@ -236,7 +258,7 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr
|
||||
|
||||
观察方法 `test.arthas.TestWatch#doGet` 执行的入参,仅当方法抛出异常时才输出。
|
||||
|
||||
```
|
||||
```bash
|
||||
$ watch test.arthas.TestWatch doGet {params[0], throwExp} -e
|
||||
Press Ctrl+C to abort.
|
||||
Affect(class-cnt:1 , method-cnt:1) cost in 65 ms.
|
||||
@@ -251,7 +273,7 @@ ts=2018-09-18 10:26:28;result=@ArrayList[
|
||||
监控某个特殊方法的调用统计数据,包括总调用次数,平均rt,成功率等信息,每隔5秒输出一次。
|
||||
|
||||
|
||||
```
|
||||
```bash
|
||||
$ monitor -c 5 org.apache.dubbo.demo.provider.DemoServiceImpl sayHello
|
||||
Press Ctrl+C to abort.
|
||||
Affect(class-cnt:1 , method-cnt:1) cost in 109 ms.
|
||||
@@ -272,7 +294,7 @@ Affect(class-cnt:1 , method-cnt:1) cost in 109 ms.
|
||||
|
||||
记录方法调用信息,支持事后查看方法调用的参数,返回值,抛出的异常等信息,仿佛穿越时空隧道回到调用现场一般。
|
||||
|
||||
```
|
||||
```bash
|
||||
$ tt -t org.apache.dubbo.demo.provider.DemoServiceImpl sayHello
|
||||
Press Ctrl+C to abort.
|
||||
Affect(class-cnt:1 , method-cnt:1) cost in 75 ms.
|
||||
@@ -293,7 +315,7 @@ Affect(class-cnt:1 , method-cnt:1) cost in 75 ms.
|
||||
|
||||
了解当前系统中有多少类加载器,以及每个加载器加载的类数量,帮助您判断是否有类加载器泄露。
|
||||
|
||||
```
|
||||
```bash
|
||||
$ classloader
|
||||
name numberOfInstances loadedCountTotal
|
||||
BootstrapClassLoader 1 3346
|
||||
|
||||
Reference in new issue
Block a user