From 5ee058446507213d4464a138b938d626984c187c Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Tue, 12 Jan 2021 19:19:15 +0800 Subject: [PATCH] update doc --- README.html | 7 +++-- _sources/advanced-use.md.txt | 2 ++ _sources/commands.md.txt | 2 ++ _sources/faq.md.txt | 39 +++++++++++++++++++++++- _sources/index.md.txt | 3 +- _sources/jad.md.txt | 2 +- _sources/mc.md.txt | 4 +-- _sources/redefine.md.txt | 7 +++-- _sources/tt.md.txt | 38 ++++++++++++++++++++++++ _sources/watch.md.txt | 17 +++++++++++ _static/documentation_options.js | 2 +- advanced-use.html | 9 ++++-- advice-class.html | 7 +++-- agent.html | 7 +++-- arthas-properties.html | 7 +++-- arthas3.html | 7 +++-- arthas_3_0/new_feature.html | 7 +++-- async.html | 7 +++-- batch-support.html | 7 +++-- cat.html | 9 ++++-- classloader.html | 9 ++++-- commands.html | 11 +++++-- contact-us.html | 7 +++-- dashboard.html | 9 ++++-- docker.html | 7 +++-- download.html | 7 +++-- dump.html | 9 ++++-- echo.html | 9 ++++-- en/.buildinfo | 2 +- en/README.html | 4 +-- en/_sources/advanced-use.md.txt | 2 ++ en/_sources/commands.md.txt | 2 ++ en/_sources/faq.md.txt | 37 +++++++++++++++++++++++ en/_sources/jad.md.txt | 2 +- en/_sources/mc.md.txt | 4 +-- en/_sources/redefine.md.txt | 5 +++- en/_sources/tt.md.txt | 41 ++++++++++++++++++++++++-- en/_sources/watch.md.txt | 17 +++++++++++ en/_static/documentation_options.js | 2 +- en/advanced-use.html | 6 ++-- en/advice-class.html | 6 ++-- en/agent.html | 4 +-- en/arthas-properties.html | 4 +-- en/async.html | 4 +-- en/batch-support.html | 4 +-- en/cat.html | 6 ++-- en/classloader.html | 6 ++-- en/commands.html | 8 +++-- en/contact-us.html | 4 +-- en/dashboard.html | 6 ++-- en/docker.html | 4 +-- en/download.html | 4 +-- en/dump.html | 6 ++-- en/echo.html | 6 ++-- en/faq.html | 33 +++++++++++++++++++-- en/genindex.html | 4 +-- en/getstatic.html | 6 ++-- en/grep.html | 10 ++++--- en/groovy.html | 4 +-- en/heapdump.html | 6 ++-- en/http-api.html | 4 +-- en/idea-plugin.html | 4 +-- en/index.html | 4 +-- en/install-detail.html | 4 +-- en/jad.html | 8 +++-- en/jvm.html | 6 ++-- en/keymap.html | 4 +-- en/logger.html | 6 ++-- en/manual-install.html | 4 +-- en/mbean.html | 6 ++-- en/mc.html | 14 +++++---- en/monitor.html | 6 ++-- en/objects.inv | Bin 929 -> 949 bytes en/ognl.html | 6 ++-- en/options.html | 6 ++-- en/perfcounter.html | 6 ++-- en/profiler.html | 6 ++-- en/pwd.html | 6 ++-- en/quick-start.html | 4 +-- en/redefine.html | 20 ++++++++----- en/release-notes.html | 4 +-- en/reset.html | 4 +-- en/save-log.html | 4 +-- en/sc.html | 6 ++-- en/search.html | 4 +-- en/searchindex.js | 2 +- en/sm.html | 6 ++-- en/spring-boot-starter.html | 4 +-- en/stack.html | 6 ++-- en/start-arthas.html | 4 +-- en/sysenv.html | 6 ++-- en/sysprop.html | 6 ++-- en/tee.html | 10 ++++--- en/thread.html | 6 ++-- en/trace.html | 6 ++-- en/tt.html | 44 ++++++++++++++++++++++++---- en/tunnel.html | 4 +-- en/vmoption.html | 6 ++-- en/watch.html | 24 +++++++++++++-- en/web-console.html | 4 +-- faq.html | 36 +++++++++++++++++++++-- genindex.html | 7 +++-- getstatic.html | 9 ++++-- grep.html | 13 ++++---- groovy.html | 7 +++-- heapdump.html | 9 ++++-- http-api.html | 7 +++-- idea-plugin.html | 7 +++-- index.html | 10 ++++--- install-detail.html | 7 +++-- jad.html | 11 ++++--- jvm.html | 9 ++++-- keymap.html | 7 +++-- logger.html | 9 ++++-- manual-install.html | 7 +++-- mbean.html | 9 ++++-- mc.html | 17 ++++++----- monitor.html | 9 ++++-- objects.inv | Bin 1128 -> 1150 bytes ognl.html | 9 ++++-- options.html | 9 ++++-- perfcounter.html | 9 ++++-- profiler.html | 9 ++++-- pwd.html | 9 ++++-- quick-start.html | 7 +++-- redefine.html | 23 +++++++++------ release-notes.html | 7 +++-- reset.html | 7 +++-- save-log.html | 7 +++-- sc.html | 9 ++++-- search.html | 7 +++-- searchindex.js | 2 +- sm.html | 9 ++++-- spring-boot-starter.html | 7 +++-- stack.html | 9 ++++-- start-arthas.html | 7 +++-- sysenv.html | 9 ++++-- sysprop.html | 9 ++++-- tee.html | 13 ++++---- thread.html | 9 ++++-- trace.html | 9 ++++-- tt.html | 41 ++++++++++++++++++++++++-- tunnel.html | 7 +++-- vmoption.html | 9 ++++-- watch.html | 37 ++++++++++++++++++----- web-console.html | 7 +++-- 146 files changed, 923 insertions(+), 364 deletions(-) diff --git a/README.html b/README.html index 39954cb2a..11c17bd3b 100644 --- a/README.html +++ b/README.html @@ -8,7 +8,7 @@ - <no title> — Arthas 3.4.5 文档 + <no title> — Arthas 3.4.6 文档 @@ -72,7 +72,7 @@
- 3.4.5 + 3.4.6
@@ -101,7 +101,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/_sources/advanced-use.md.txt b/_sources/advanced-use.md.txt index b751cc77e..27138c8bc 100644 --- a/_sources/advanced-use.md.txt +++ b/_sources/advanced-use.md.txt @@ -8,6 +8,7 @@ * [cat](cat.md)——打印文件内容,和linux里的cat命令类似 * [echo](echo.md)--打印参数,和linux里的echo命令类似 * [grep](grep.md)——匹配查找,和linux里的grep命令类似 +* [base64](base64.md)——base64编码转换,和linux里的base64命令类似 * [tee](tee.md)——复制标准输入到标准输出和指定的文件,和linux里的tee命令类似 * [pwd](pwd.md)——返回当前的工作目录,和linux命令类似 * cls——清空当前屏幕区域 @@ -42,6 +43,7 @@ * [sm](sm.md)——查看已加载类的方法信息 * [jad](jad.md)——反编译指定已加载类的源码 * [mc](mc.md)——内存编译器,内存编译`.java`文件为`.class`文件 +* [retransform](retransform.md)——加载外部的`.class`文件,retransform到JVM里 * [redefine](redefine.md)——加载外部的`.class`文件,redefine到JVM里 * [dump](dump.md)——dump 已加载类的 byte code 到特定目录 * [classloader](classloader.md)——查看classloader的继承树,urls,类加载信息,使用classloader去getResource diff --git a/_sources/commands.md.txt b/_sources/commands.md.txt index a48066d8a..7077aacfc 100644 --- a/_sources/commands.md.txt +++ b/_sources/commands.md.txt @@ -22,6 +22,7 @@ * [jad](jad.md) * [classloader](classloader.md) * [mc](mc.md) +* [retransform](retransform.md) * [redefine](redefine.md) * [monitor](monitor.md) @@ -35,6 +36,7 @@ * [cat](cat.md) * [echo](echo.md) * [grep](grep.md) +* [base64](base64.md) * [tee](tee.md) * [pwd](pwd.md) * [options](options.md) diff --git a/_sources/faq.md.txt b/_sources/faq.md.txt index 2a7d679c7..4462e545d 100644 --- a/_sources/faq.md.txt +++ b/_sources/faq.md.txt @@ -9,6 +9,16 @@ [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) +##### trace/watch等命令能否增强jdk里的类? + +默认情况下会过滤掉`java.`开头的类,但可以通过参数开启。 + +```bash +options unsafe true +``` + +更多参考 [options](options.md) + ##### 怎么以`json`格式查看结果 ```bash @@ -25,4 +35,31 @@ options json-format true ##### 能不能查看内存里某个变量的值 -不能。但可以用一些技巧,用`tt`命令拦截到对象,或者从静态函数里取到对象。 \ No newline at end of file +不能。但可以用一些技巧,用`tt`命令拦截到对象,或者从静态函数里取到对象。 + + +##### 方法同名过滤 + +同名方法过滤可以通过匹配表达式,可以使用[表达式核心变量](advice-class.md)中所有变量作为已知条件,可以通过判断参数个数`params.length ==1`, 参数类型`params[0] instanceof java.lang.Integer`、返回值类型 `returnObj instanceof java.util.List` 等等一种或者多种组合进行过滤。 + +可以使用 `-v` 查看观察匹配表达式的执行结果 [https://github.com/alibaba/arthas/issues/1348](https://github.com/alibaba/arthas/issues/1348) + +例子[arthas-demo](quick-start.md) + +```bash +watch demo.MathGame primeFactors traceE '{params,returnObj,throwExp}' -v -n 5 -x 3 'params.length >0 && returnObj instanceof java.util.List' +``` + +##### 怎么watch、trace 构造函数 ? + +```bash +watch demo.MathGame '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1' +``` + + +##### java.lang.ClassFormatError: null、skywalking arthas 兼容使用 + +当出现这个错误日志`java.lang.ClassFormatError: null`,通常情况下都是被其他字节码工具修改过与arthas修改字节码不兼容。 + +比如: 使用 skywalking V8.1.0 以下版本 [无法trace、watch 被skywalking agent 增强过的类](https://github.com/alibaba/arthas/issues/1141), V8.1.0 以上版本可以兼容使用,更多参考skywalking配置 [skywalking compatible with other javaagent bytecode processing](https://github.com/apache/skywalking/blob/v8.1.0/docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md)。 + diff --git a/_sources/index.md.txt b/_sources/index.md.txt index 6bd8604b7..47fa3f149 100644 --- a/_sources/index.md.txt +++ b/_sources/index.md.txt @@ -31,7 +31,8 @@ Contents * [招聘!](https://mp.weixin.qq.com/s/k5jozrSgmyH0tcQfrDkxUQ) * [技术征文!](https://developer.aliyun.com/article/751641) * [English Docs](https://arthas.aliyun.com/doc/en/) -* [在线教程(推荐)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn) +* [在线教程(国内)](https://start.aliyun.com/handson-lab/#!category=arthas) +* [在线教程(国外)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn) * [安装](install-detail.md) * [下载](download.md) * [快速入门](quick-start.md) diff --git a/_sources/jad.md.txt b/_sources/jad.md.txt index 5fea91ed9..b4efd4a94 100644 --- a/_sources/jad.md.txt +++ b/_sources/jad.md.txt @@ -57,7 +57,7 @@ CharSequence { #### 反编译时只显示源代码 -默认情况下,反编译结果里会带有`ClassLoader`信息,通过`--source-only`选项,可以只打印源代码。方便和[mc](mc.md)/[redefine](redefine.md)命令结合使用。 +默认情况下,反编译结果里会带有`ClassLoader`信息,通过`--source-only`选项,可以只打印源代码。方便和[mc](mc.md)/[retransform](retransform.md)命令结合使用。 ``` $ jad --source-only demo.MathGame diff --git a/_sources/mc.md.txt b/_sources/mc.md.txt index a50c5b9a0..a479b56b3 100644 --- a/_sources/mc.md.txt +++ b/_sources/mc.md.txt @@ -30,6 +30,6 @@ Affect(row-cnt:1) cost in 346 ms mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java ``` -编译生成`.class`文件之后,可以结合[redefine](redefine.md)命令实现热更新代码。 +编译生成`.class`文件之后,可以结合[retransform](retransform.md)命令实现热更新代码。 -> 注意,mc命令有可能失败。如果编译失败可以在本地编译好`.class`文件,再上传到服务器。具体参考[redefine](redefine.md)命令说明。 \ No newline at end of file +> 注意,mc命令有可能失败。如果编译失败可以在本地编译好`.class`文件,再上传到服务器。具体参考[retransform](retransform.md)命令说明。 \ No newline at end of file diff --git a/_sources/redefine.md.txt b/_sources/redefine.md.txt index 872d74cad..fcfc212d8 100644 --- a/_sources/redefine.md.txt +++ b/_sources/redefine.md.txt @@ -1,6 +1,8 @@ redefine === +> 推荐使用 [retransform](retransform.md) 命令 + [`mc-redefine`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials?language=cn&id=command-mc-redefine) > 加载外部的`.class`文件,redefine jvm已加载的类。 @@ -9,6 +11,8 @@ redefine ### 常见问题 +> 推荐使用 [retransform](retransform.md) 命令 + * redefine的class不能修改、添加、删除类的field和method,包括方法参数、方法名称及返回值 * 如果mc失败,可以在本地开发环境编译好class文件,上传到目标系统,使用redefine热加载class @@ -28,9 +32,6 @@ redefine |---:|:---| |[c:]|ClassLoader的hashcode| |`[classLoaderClass:]`|指定执行表达式的 ClassLoader 的 class name| -|[p:]|外部的`.class`文件的完整路径,支持多个| - - ### 使用参考 diff --git a/_sources/tt.md.txt b/_sources/tt.md.txt index bb3ea4580..165d65c9e 100644 --- a/_sources/tt.md.txt +++ b/_sources/tt.md.txt @@ -175,6 +175,44 @@ Affect(row-cnt:1) cost in 14 ms. 你会发现结果虽然一样,但调用的路径发生了变化,由原来的程序发起变成了 Arthas 自己的内部线程发起的调用了。 + +#### 观察表达式 + +`-w, --watch-express` 观察时空隧道使用`ognl` 表达式 + +* 使用[表达式核心变量](advice-class.md)中所有变量作为已知条件编写表达式。 + +```bash +[arthas@10718]$ tt -t demo.MathGame run -n 5 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1 + INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run +[arthas@10718]$ tt -w 'target.illegalArgumentCount' -x 1 -i 1000 +@Integer[60] +Affect(row-cnt:1) cost in 7 ms. +``` + +* 获取类的静态字段、调用类的静态方法 + +```bash +[arthas@10718]$ tt -t demo.MathGame run -n 5 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1 + INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)' -x 1 -i 1000 +@Integer[46] +``` + +注意这里使用 `com.taobao.arthas.core.advisor.Advice#getLoader`加载,使用精确`classloader` [ognl](ognl.md)更好。 + + +高级用法 [获取spring context 调用bean 方法](https://github.com/alibaba/arthas/issues/482) + + - 需要强调的点 1. **ThreadLocal 信息丢失** diff --git a/_sources/watch.md.txt b/_sources/watch.md.txt index e843dbc7f..85937ac33 100644 --- a/_sources/watch.md.txt +++ b/_sources/watch.md.txt @@ -235,6 +235,23 @@ ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8] ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8] ``` +#### 获取类的静态字段、调用类的静态方法的例子 + +```bash +watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2 +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3 +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[ + @Object[][ + @Integer[-138282], + ], + @Integer[89], +] +``` + +* 注意这里使用 `Thread.currentThread().getContextClassLoader()` 加载,使用精确`classloader` [ognl](ognl.md)更好。 + #### 排除掉指定的类 > watch/trace/monitor/stack/tt 命令都支持 `--exclude-class-pattern` 参数 diff --git a/_static/documentation_options.js b/_static/documentation_options.js index e6be489f9..9b381ba59 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '3.4.5', + VERSION: '3.4.6', LANGUAGE: 'zh_CN', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/advanced-use.html b/advanced-use.html index bb31ea4ba..ec705eb41 100644 --- a/advanced-use.html +++ b/advanced-use.html @@ -8,7 +8,7 @@ - 进阶使用 — Arthas 3.4.5 文档 + 进阶使用 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • @@ -227,6 +228,7 @@
  • cat——打印文件内容,和linux里的cat命令类似

  • echo–打印参数,和linux里的echo命令类似

  • grep——匹配查找,和linux里的grep命令类似

  • +
  • base64——base64编码转换,和linux里的base64命令类似

  • tee——复制标准输入到标准输出和指定的文件,和linux里的tee命令类似

  • pwd——返回当前的工作目录,和linux命令类似

  • cls——清空当前屏幕区域

  • @@ -263,6 +265,7 @@
  • sm——查看已加载类的方法信息

  • jad——反编译指定已加载类的源码

  • mc——内存编译器,内存编译.java文件为.class文件

  • +
  • retransform——加载外部的.class文件,retransform到JVM里

  • redefine——加载外部的.class文件,redefine到JVM里

  • dump——dump 已加载类的 byte code 到特定目录

  • classloader——查看classloader的继承树,urls,类加载信息,使用classloader去getResource

  • diff --git a/advice-class.html b/advice-class.html index 905e42df1..5dfdfe0f8 100644 --- a/advice-class.html +++ b/advice-class.html @@ -8,7 +8,7 @@ - 表达式核心变量 — Arthas 3.4.5 文档 + 表达式核心变量 — Arthas 3.4.6 文档 @@ -72,7 +72,7 @@
    - 3.4.5 + 3.4.6
    @@ -101,7 +101,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/agent.html b/agent.html index d1524052b..59aa8c179 100644 --- a/agent.html +++ b/agent.html @@ -8,7 +8,7 @@ - 以Java Agent的方式启动 — Arthas 3.4.5 文档 + 以Java Agent的方式启动 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/arthas-properties.html b/arthas-properties.html index 6d86508e5..117056fc4 100644 --- a/arthas-properties.html +++ b/arthas-properties.html @@ -8,7 +8,7 @@ - Arthas Properties — Arthas 3.4.5 文档 + Arthas Properties — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/arthas3.html b/arthas3.html index 1d76b7444..cfc3183ef 100644 --- a/arthas3.html +++ b/arthas3.html @@ -8,7 +8,7 @@ - Arthas3.0的新特性 — Arthas 3.4.5 文档 + Arthas3.0的新特性 — Arthas 3.4.6 文档 @@ -72,7 +72,7 @@
    - 3.4.5 + 3.4.6
    @@ -101,7 +101,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/arthas_3_0/new_feature.html b/arthas_3_0/new_feature.html index d0d53eae2..426847662 100644 --- a/arthas_3_0/new_feature.html +++ b/arthas_3_0/new_feature.html @@ -8,7 +8,7 @@ - Arthas 3.0新特性介绍 — Arthas 3.4.5 文档 + Arthas 3.0新特性介绍 — Arthas 3.4.6 文档 @@ -72,7 +72,7 @@
    - 3.4.5 + 3.4.6
    @@ -101,7 +101,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/async.html b/async.html index 1c9d53689..ead8f5a31 100644 --- a/async.html +++ b/async.html @@ -8,7 +8,7 @@ - Arthas后台异步任务 — Arthas 3.4.5 文档 + Arthas后台异步任务 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/batch-support.html b/batch-support.html index d795160ac..9353f097c 100644 --- a/batch-support.html +++ b/batch-support.html @@ -8,7 +8,7 @@ - 批处理功能 — Arthas 3.4.5 文档 + 批处理功能 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/cat.html b/cat.html index 01f79ae04..129971040 100644 --- a/cat.html +++ b/cat.html @@ -8,7 +8,7 @@ - cat — Arthas 3.4.5 文档 + cat — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • @@ -127,6 +128,7 @@
  • jad
  • classloader
  • mc
  • +
  • retransform
  • redefine
  • monitor
  • watch
  • @@ -137,6 +139,7 @@
  • cat
  • echo
  • grep
  • +
  • base64
  • tee
  • pwd
  • options
  • diff --git a/classloader.html b/classloader.html index f928e4384..e574bebcb 100644 --- a/classloader.html +++ b/classloader.html @@ -8,7 +8,7 @@ - classloader — Arthas 3.4.5 文档 + classloader — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • @@ -139,6 +140,7 @@
  • mc
  • +
  • retransform
  • redefine
  • monitor
  • watch
  • @@ -149,6 +151,7 @@
  • cat
  • echo
  • grep
  • +
  • base64
  • tee
  • pwd
  • options
  • diff --git a/commands.html b/commands.html index 9fb07bad4..90da36b08 100644 --- a/commands.html +++ b/commands.html @@ -8,7 +8,7 @@ - 命令列表 — Arthas 3.4.5 文档 + 命令列表 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • @@ -127,6 +128,7 @@
  • jad
  • classloader
  • mc
  • +
  • retransform
  • redefine
  • monitor
  • watch
  • @@ -137,6 +139,7 @@
  • cat
  • echo
  • grep
  • +
  • base64
  • tee
  • pwd
  • options
  • @@ -243,6 +246,7 @@
  • jad
  • classloader
  • mc
  • +
  • retransform
  • redefine
  • monitor
  • watch
  • @@ -253,6 +257,7 @@
  • cat
  • echo
  • grep
  • +
  • base64
  • tee
  • pwd
  • options
  • diff --git a/contact-us.html b/contact-us.html index 54d919acd..21642b746 100644 --- a/contact-us.html +++ b/contact-us.html @@ -8,7 +8,7 @@ - 联系我们 — Arthas 3.4.5 文档 + 联系我们 — Arthas 3.4.6 文档 @@ -73,7 +73,7 @@
    - 3.4.5 + 3.4.6
    @@ -102,7 +102,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/dashboard.html b/dashboard.html index 31532d626..609d5ba31 100644 --- a/dashboard.html +++ b/dashboard.html @@ -8,7 +8,7 @@ - dashboard — Arthas 3.4.5 文档 + dashboard — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • @@ -136,6 +137,7 @@
  • jad
  • classloader
  • mc
  • +
  • retransform
  • redefine
  • monitor
  • watch
  • @@ -146,6 +148,7 @@
  • cat
  • echo
  • grep
  • +
  • base64
  • tee
  • pwd
  • options
  • diff --git a/docker.html b/docker.html index 7791f517f..ca612df92 100644 --- a/docker.html +++ b/docker.html @@ -8,7 +8,7 @@ - Docker — Arthas 3.4.5 文档 + Docker — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
  • 快速入门
  • diff --git a/download.html b/download.html index 8f2f17860..bb9ccc623 100644 --- a/download.html +++ b/download.html @@ -8,7 +8,7 @@ - 下载 — Arthas 3.4.5 文档 + 下载 — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
    - 3.4.5 + 3.4.6
    @@ -103,7 +103,8 @@
  • 招聘!
  • 技术征文
  • English Docs
  • -
  • 在线教程(推荐)
  • +
  • 在线教程(国内)
  • +
  • 在线教程(国外)
  • 安装
  • 下载
    • 下载全量包
        diff --git a/dump.html b/dump.html index a1c0951bc..916326222 100644 --- a/dump.html +++ b/dump.html @@ -8,7 +8,7 @@ - dump — Arthas 3.4.5 文档 + dump — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
        - 3.4.5 + 3.4.6
        @@ -103,7 +103,8 @@
      • 招聘!
      • 技术征文
      • English Docs
      • -
      • 在线教程(推荐)
      • +
      • 在线教程(国内)
      • +
      • 在线教程(国外)
      • 安装
      • 下载
      • 快速入门
      • @@ -131,6 +132,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -141,6 +143,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/echo.html b/echo.html index cb9a8521a..899dca4c0 100644 --- a/echo.html +++ b/echo.html @@ -8,7 +8,7 @@ - echo — Arthas 3.4.5 文档 + echo — Arthas 3.4.6 文档 @@ -74,7 +74,7 @@
        - 3.4.5 + 3.4.6
        @@ -103,7 +103,8 @@
      • 招聘!
      • 技术征文
      • English Docs
      • -
      • 在线教程(推荐)
      • +
      • 在线教程(国内)
      • +
      • 在线教程(国外)
      • 安装
      • 下载
      • 快速入门
      • @@ -127,6 +128,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -137,6 +139,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/.buildinfo b/en/.buildinfo index a43bf9c34..9b9b3c066 100644 --- a/en/.buildinfo +++ b/en/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 5284b8e171e90cb633fef8fe68031aa1 +config: 9f7cecd0264d1aac1ed1c3ad3f11ca41 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/en/README.html b/en/README.html index 9c78bbc49..5c411d31c 100644 --- a/en/README.html +++ b/en/README.html @@ -8,7 +8,7 @@ - <no title> — Arthas ${revision} documentation + <no title> — Arthas 3.4.6 documentation @@ -71,7 +71,7 @@
        - ${revision} + 3.4.6
        diff --git a/en/_sources/advanced-use.md.txt b/en/_sources/advanced-use.md.txt index 5b8194e74..6464c02c0 100644 --- a/en/_sources/advanced-use.md.txt +++ b/en/_sources/advanced-use.md.txt @@ -8,6 +8,7 @@ Advanced Usage * [cat](cat.md) - Concatenate and print files * [echo](echo.md) - write arguments to the standard output * [grep](grep.md) - Pattern searcher +* [base64](base64.md) - Encode and decode using Base64 representation. * [tee](tee.md) - Copies standard input to standard output, making a copy in zero or more files. * [pwd](pwd.md) - Return working directory name * session - display current session information @@ -39,6 +40,7 @@ Advanced Usage * [sm](sm.md) - check methods info for the loaded classes * [jad](jad.md) - decompile the specified loaded classes * [mc](mc.md) - Memory compiler, compiles `.java` files into `.class` files in memory +* [retransform](retransform.md) - load external `*.class` files and retransform it into JVM * [redefine](redefine.md) - load external `*.class` files and re-define it into JVM * [dump](dump.md) - dump the loaded classes in byte code to the specified location * [classloader](classloader.md) - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. `java/lang/String.class` diff --git a/en/_sources/commands.md.txt b/en/_sources/commands.md.txt index f60729ee3..13a35189c 100644 --- a/en/_sources/commands.md.txt +++ b/en/_sources/commands.md.txt @@ -22,6 +22,7 @@ All Commands * [jad](jad.md) * [classloader](classloader.md) * [mc](mc.md) +* [retransform](retransform.md) * [redefine](redefine.md) * [monitor](monitor.md) @@ -35,6 +36,7 @@ All Commands * [cat](cat.md) * [echo](echo.md) * [grep](grep.md) +* [base64](base64.md) * [tee](tee.md) * [pwd](pwd.md) * [options](options.md) diff --git a/en/_sources/faq.md.txt b/en/_sources/faq.md.txt index 36e2de12f..cb9f8beb5 100644 --- a/en/_sources/faq.md.txt +++ b/en/_sources/faq.md.txt @@ -8,6 +8,17 @@ [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) +##### Can commands such as trace/watch enhance the classes in jdk? + +By default, classes beginning with `java.` are filtered out, but they can be turned on: + +```bash +options unsafe true +``` + +See more at [options](options.md) + + ##### How to view the result in `json` format ```bash @@ -24,3 +35,29 @@ No. ##### Can arthas view the value of a variable in memory? No. But you can use some tricks to intercept the object with the `tt` command, or fetch it from a static method. + + +##### How to filter method with the same name? + +You can used all variables in [fundamental fields in expressions](advice-class.md) for the condition express to filter method with the same name, you can use the number of parameters `params.length ==1`,parameter type `params[0] instanceof java.lang.Integer`,return value type `returnObj instanceof java.util.List` and so on in one or more combinations as condition express. + +You can use `-v` to view the condition express result [https://github.com/alibaba/arthas/issues/1348](https://github.com/alibaba/arthas/issues/1348) + +example [arthas-demo](quick-start.md) + +```bash +watch demo.MathGame primeFactors traceE '{params,returnObj,throwExp}' -v -n 5 -x 3 'params.length >0 && returnObj instanceof java.util.List' +``` + +##### How to watch or trace constructor? + +```bash +watch demo.MathGame '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1' +``` + + +##### java.lang.ClassFormatError: null, skywalking arthas compatible use + +When error log appear `java.lang.ClassFormatError: null`, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode. + +For example: use skywalking V8.1.0 below [cannot trace, watch classes enhanced by skywalking agent](https://github.com/alibaba/arthas/issues/1141), V8.1.0 or above is compatible, refer to skywalking configuration for more details. [skywalking compatible with other javaagent bytecode processing](https://github.com/apache/skywalking/blob/v8.1.0/docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md). \ No newline at end of file diff --git a/en/_sources/jad.md.txt b/en/_sources/jad.md.txt index 4c7347bec..839b61a1b 100644 --- a/en/_sources/jad.md.txt +++ b/en/_sources/jad.md.txt @@ -57,7 +57,7 @@ CharSequence { #### Print source only -By default, the decompile result will have the `ClassLoader` information. With the `--source-only` option, you can print only the source code. Conveniently used with the [mc](mc.md)/[redefine](redefine.md) commands. +By default, the decompile result will have the `ClassLoader` information. With the `--source-only` option, you can print only the source code. Conveniently used with the [mc](mc.md)/[retransform](retransform.md) commands. ``` $ jad --source-only demo.MathGame diff --git a/en/_sources/mc.md.txt b/en/_sources/mc.md.txt index 455b655f3..834e7163c 100644 --- a/en/_sources/mc.md.txt +++ b/en/_sources/mc.md.txt @@ -30,6 +30,6 @@ The output directory can be specified with the `-d` option: mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java ``` -After compiling the `.class` file, you can use the [redefine](redefine.md) command to re-define the loaded classes in JVM. +After compiling the `.class` file, you can use the [retransform](retransform.md) command to re-define the loaded classes in JVM. -> Note that the mc command may fail. If the compilation fails, the `.class` file can be compiled locally and uploaded to the server. Refer to the [redefine](redefine.md) command description for details. \ No newline at end of file +> Note that the mc command may fail. If the compilation fails, the `.class` file can be compiled locally and uploaded to the server. Refer to the [retransform](retransform.md) command description for details. \ No newline at end of file diff --git a/en/_sources/redefine.md.txt b/en/_sources/redefine.md.txt index e1a36d48a..8573a50bf 100644 --- a/en/_sources/redefine.md.txt +++ b/en/_sources/redefine.md.txt @@ -1,6 +1,8 @@ redefine ======== +> Recommend to use the [retransform](retransform.md) command. + [`mc-redefine` online tutorial](https://arthas.aliyun.com/doc/arthas-tutorials?language=en&id=command-mc-redefine) > Load the external `*.class` files to re-define the loaded classes in JVM. @@ -9,6 +11,8 @@ Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/do ### Frequently asked questions +> Recommend to use the [retransform](retransform.md) command. + * The class of `redefine` cannot modify, add or delete the field and method of the class, including method parameters, method names and return values. * If `mc` fails, you can compile the class file in the local development environment, upload it to the target system, and use `redefine` to hot load the class. @@ -29,7 +33,6 @@ Reference: [Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/do |---:|:---| |`[c:]`|hashcode of the class loader| |`[classLoaderClass:]`| The class name of the ClassLoader that executes the expression. | -|`[p:]`|absolute path of the external `*.class`, multiple paths are separated with 'space'| ### Usage diff --git a/en/_sources/tt.md.txt b/en/_sources/tt.md.txt index 6c0845af6..da877a462 100644 --- a/en/_sources/tt.md.txt +++ b/en/_sources/tt.md.txt @@ -127,7 +127,7 @@ $ tt -i 1003 Affect(row-cnt:1) cost in 11 ms. ``` -### Replay record +#### Replay record Since Arthas stores the context of the call, you can even *replay* the method calling afterwards with extra option `-p` to replay the issue for advanced troubleshooting, option `--replay-times` define the replay execution times, option `--replay-interval` define the interval(unit in ms,with default value 1000) of replays @@ -152,13 +152,50 @@ Time fragment[1004] successfully replayed. Affect(row-cnt:1) cost in 14 ms. ``` +#### Watch express + +`-w, --watch-express` watch the time fragment by ognl express. + +* You can used all variables in [fundamental fields in expressions](advice-class.md) for the watch express。 + +```bash +[arthas@10718]$ tt -t demo.MathGame run -n 5 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1 + INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run +[arthas@10718]$ tt -w 'target.illegalArgumentCount' -x 1 -i 1000 +@Integer[60] +Affect(row-cnt:1) cost in 7 ms. +``` + +* Get a static field and calling a static method + +```bash +[arthas@10718]$ tt -t demo.MathGame run -n 5 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1 + INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1000 2021-01-08 21:54:17 0.901091 true false 0x7699a589 MathGame run +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)' -x 1 -i 1000 +@Integer[46] +``` + +Note that `com.taobao.arthas.core.advisor.Advice#getLoader` is used here, and that it is better to use the exact `classloader` [ognl](ognl.md). + + +Advanced usage [get spring context to call the bean method](https://github.com/alibaba/arthas/issues/482) + + F.Y.I 1. **Loss** of the `ThreadLocal` Arthas save params into an array, then invoke the method with the params again. The method execute in another thread, so the `ThreadLocal` **lost**. -1. params may be modified +2. params may be modified Arthas save params into an array, they are object references. The Objects may be modified by other code. diff --git a/en/_sources/watch.md.txt b/en/_sources/watch.md.txt index c1d67bcde..56373011a 100644 --- a/en/_sources/watch.md.txt +++ b/en/_sources/watch.md.txt @@ -235,6 +235,23 @@ ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8] ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8] ``` +#### Get a static field and calling a static method + +```bash +watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2 +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2 +Press Q or Ctrl+C to abort. +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3 +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[ + @Object[][ + @Integer[-138282], + ], + @Integer[89], +] +``` + +* Note that here you use `Thread.currentThread().getContextClassLoader()` to load, and it is better to use the exact `classloader` [ognl](ognl.md). + #### Exclude the specified class diff --git a/en/_static/documentation_options.js b/en/_static/documentation_options.js index 5521447a4..2bd35aa0d 100644 --- a/en/_static/documentation_options.js +++ b/en/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '${revision}', + VERSION: '3.4.6', LANGUAGE: 'en', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/en/advanced-use.html b/en/advanced-use.html index ae5f03f6d..4e33e70f1 100644 --- a/en/advanced-use.html +++ b/en/advanced-use.html @@ -8,7 +8,7 @@ - Advanced Usage — Arthas ${revision} documentation + Advanced Usage — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -224,6 +224,7 @@
      • cat - Concatenate and print files

      • echo - write arguments to the standard output

      • grep - Pattern searcher

      • +
      • base64 - Encode and decode using Base64 representation.

      • tee - Copies standard input to standard output, making a copy in zero or more files.

      • pwd - Return working directory name

      • session - display current session information

      • @@ -259,6 +260,7 @@
      • sm - check methods info for the loaded classes

      • jad - decompile the specified loaded classes

      • mc - Memory compiler, compiles .java files into .class files in memory

      • +
      • retransform - load external *.class files and retransform it into JVM

      • redefine - load external *.class files and re-define it into JVM

      • dump - dump the loaded classes in byte code to the specified location

      • classloader - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. java/lang/String.class

      • diff --git a/en/advice-class.html b/en/advice-class.html index 2825c4590..ad9b26761 100644 --- a/en/advice-class.html +++ b/en/advice-class.html @@ -8,7 +8,7 @@ - Fundamental Fields in Expressions — Arthas ${revision} documentation + Fundamental Fields in Expressions — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -123,6 +123,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
          @@ -142,6 +143,7 @@
        • cat
        • echo
        • grep
        • +
        • base64
        • tee
        • pwd
        • options
        • diff --git a/en/agent.html b/en/agent.html index ecf50f5c1..19199604a 100644 --- a/en/agent.html +++ b/en/agent.html @@ -8,7 +8,7 @@ - Start as a Java Agent — Arthas ${revision} documentation + Start as a Java Agent — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          diff --git a/en/arthas-properties.html b/en/arthas-properties.html index 2e1f22dbe..898321c74 100644 --- a/en/arthas-properties.html +++ b/en/arthas-properties.html @@ -8,7 +8,7 @@ - Arthas Properties — Arthas ${revision} documentation + Arthas Properties — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          diff --git a/en/async.html b/en/async.html index 234cf235a..c3467480c 100644 --- a/en/async.html +++ b/en/async.html @@ -8,7 +8,7 @@ - Arthas Async Jobs — Arthas ${revision} documentation + Arthas Async Jobs — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          diff --git a/en/batch-support.html b/en/batch-support.html index 67ca980c7..1410f373f 100644 --- a/en/batch-support.html +++ b/en/batch-support.html @@ -8,7 +8,7 @@ - Batch Processing — Arthas ${revision} documentation + Batch Processing — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          diff --git a/en/cat.html b/en/cat.html index b77142ec3..4fb22e546 100644 --- a/en/cat.html +++ b/en/cat.html @@ -8,7 +8,7 @@ - cat — Arthas ${revision} documentation + cat — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          @@ -123,6 +123,7 @@
        • jad
        • classloader
        • mc
        • +
        • retransform
        • redefine
        • monitor
        • watch
        • @@ -133,6 +134,7 @@
        • cat
        • echo
        • grep
        • +
        • base64
        • tee
        • pwd
        • options
        • diff --git a/en/classloader.html b/en/classloader.html index 25286693f..f7b17991a 100644 --- a/en/classloader.html +++ b/en/classloader.html @@ -8,7 +8,7 @@ - classloader — Arthas ${revision} documentation + classloader — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
          - ${revision} + 3.4.6
          @@ -135,6 +135,7 @@
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -145,6 +146,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/commands.html b/en/commands.html index 8c5d58983..10e7ff02d 100644 --- a/en/commands.html +++ b/en/commands.html @@ -8,7 +8,7 @@ - All Commands — Arthas ${revision} documentation + All Commands — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -123,6 +123,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -133,6 +134,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • @@ -239,6 +241,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -249,6 +252,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/contact-us.html b/en/contact-us.html index 977670df7..eedd34305 100644 --- a/en/contact-us.html +++ b/en/contact-us.html @@ -8,7 +8,7 @@ - Contact Us — Arthas ${revision} documentation + Contact Us — Arthas 3.4.6 documentation @@ -72,7 +72,7 @@
        - ${revision} + 3.4.6
        diff --git a/en/dashboard.html b/en/dashboard.html index 16ee6739b..48d55a429 100644 --- a/en/dashboard.html +++ b/en/dashboard.html @@ -8,7 +8,7 @@ - dashboard — Arthas ${revision} documentation + dashboard — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -132,6 +132,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -142,6 +143,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/docker.html b/en/docker.html index 1822ca306..d3cd9459c 100644 --- a/en/docker.html +++ b/en/docker.html @@ -8,7 +8,7 @@ - Docker — Arthas ${revision} documentation + Docker — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        diff --git a/en/download.html b/en/download.html index 3b050473a..4267f0d53 100644 --- a/en/download.html +++ b/en/download.html @@ -8,7 +8,7 @@ - Download — Arthas ${revision} documentation + Download — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        diff --git a/en/dump.html b/en/dump.html index fdd1c7dbd..02ce855b2 100644 --- a/en/dump.html +++ b/en/dump.html @@ -8,7 +8,7 @@ - dump — Arthas ${revision} documentation + dump — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -127,6 +127,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -137,6 +138,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/echo.html b/en/echo.html index 0c50a2c31..f8b090670 100644 --- a/en/echo.html +++ b/en/echo.html @@ -8,7 +8,7 @@ - echo — Arthas ${revision} documentation + echo — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -123,6 +123,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -133,6 +134,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/faq.html b/en/faq.html index 9b11d37a3..8b0865b46 100644 --- a/en/faq.html +++ b/en/faq.html @@ -8,7 +8,7 @@ - FAQ — Arthas ${revision} documentation + FAQ — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -114,9 +114,13 @@
      • User cases
      • FAQ
      • Star me at GitHub
      • @@ -198,6 +202,13 @@

        How much impact does Arthas attach have on the performance of the original process?

        https://github.com/alibaba/arthas/issues/44

        +
        +

        Can commands such as trace/watch enhance the classes in jdk?

        +

        By default, classes beginning with java. are filtered out, but they can be turned on:

        +
        options unsafe true
        +
        +

        See more at options

        +

        How to view the result in json format

        options json-format true
        @@ -212,6 +223,24 @@

        Can arthas view the value of a variable in memory?

        No. But you can use some tricks to intercept the object with the tt command, or fetch it from a static method.

        +
        +

        How to filter method with the same name?

        +

        You can used all variables in fundamental fields in expressions for the condition express to filter method with the same name, you can use the number of parameters params.length ==1,parameter type params[0] instanceof java.lang.Integer,return value type returnObj instanceof java.util.List and so on in one or more combinations as condition express.

        +

        You can use -v to view the condition express result https://github.com/alibaba/arthas/issues/1348

        +

        example arthas-demo

        +
        watch demo.MathGame primeFactors traceE '{params,returnObj,throwExp}' -v -n 5 -x 3 'params.length >0 && returnObj instanceof java.util.List'
        +
        +
        +
        +

        How to watch or trace constructor?

        +
        watch demo.MathGame <init> '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1'
        +
        +
        +
        +

        java.lang.ClassFormatError: null, skywalking arthas compatible use

        +

        When error log appear java.lang.ClassFormatError: null, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.

        +

        For example: use skywalking V8.1.0 below cannot trace, watch classes enhanced by skywalking agent, V8.1.0 or above is compatible, refer to skywalking configuration for more details. skywalking compatible with other javaagent bytecode processing.

        +
        diff --git a/en/genindex.html b/en/genindex.html index cc4aa4eb9..d70235149 100644 --- a/en/genindex.html +++ b/en/genindex.html @@ -9,7 +9,7 @@ - Index — Arthas ${revision} documentation + Index — Arthas 3.4.6 documentation @@ -72,7 +72,7 @@
        - ${revision} + 3.4.6
        diff --git a/en/getstatic.html b/en/getstatic.html index cd5b5cda3..1a286abd7 100644 --- a/en/getstatic.html +++ b/en/getstatic.html @@ -8,7 +8,7 @@ - getstatic — Arthas ${revision} documentation + getstatic — Arthas 3.4.6 documentation @@ -73,7 +73,7 @@
        - ${revision} + 3.4.6
        @@ -127,6 +127,7 @@
      • jad
      • classloader
      • mc
      • +
      • retransform
      • redefine
      • monitor
      • watch
      • @@ -137,6 +138,7 @@
      • cat
      • echo
      • grep
      • +
      • base64
      • tee
      • pwd
      • options
      • diff --git a/en/grep.html b/en/grep.html index a929a5569..4043a77ec 100644 --- a/en/grep.html +++ b/en/grep.html @@ -8,7 +8,7 @@ - grep — Arthas ${revision} documentation + grep — Arthas 3.4.6 documentation @@ -38,7 +38,7 @@ - +