update faq.md

This commit is contained in:
hengyunabc 2021-06-10 15:58:13 +08:00
parent e6f5b5971d
commit edd3fb8ef5
2 changed files with 19 additions and 6 deletions

View File

@ -61,13 +61,13 @@ You can use `-v` to view the condition express result [https://github.com/alibab
example [math-game](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 demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
```
##### How to watch or trace constructor?
```bash
watch demo.MathGame <init> '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1'
watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
```
@ -84,4 +84,11 @@ Yes. Just download the full size package and unzip it, refer to: [Download](down
##### Attach the process with pid 1 in docker/k8s failed
Reference: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416)
Reference: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416)
##### Why is the new version of Arthas downloaded, but the old version is connected?
For example, the started version of `as.sh/arthas-boot.jar` is 3.5.*, but after connecting, the printed arthas version is 3.4.*.
It may be that the target process has been diagnosed with the old version of arthas before. You can execute `stop` to stop the old version of arthas, and then reuse the new version to attach.

View File

@ -60,13 +60,13 @@ options json-format true
例子[math-game](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 demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
```
##### 怎么watch、trace 构造函数
```bash
watch demo.MathGame <init> '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1'
watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
```
@ -83,4 +83,10 @@ watch demo.MathGame <init> '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1'
##### Attach docker/k8s 里的 pid 为 1 的进程失败
参考: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416)
参考: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416)
##### 为什么下载了新版本的Arthas连接的却是旧版本
比如启动的 `as.sh/arthas-boot.jar` 版本是3.5.* 的但是连接上之后打印的arthas版本是 3.4.* 的。
可能是之前使用旧版本的arthas诊断过目标进程。可以先执行`stop`停止掉旧版本的arthas再重新使用新版本attach。