1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00

arthas, arthas-{trace,watch}: add page and Chinese translation (#15487)

* arthas: add page

* Update pages/common/arthas-trace.md

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

* Update pages/common/arthas-trace.md

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

* arthas: fix Syntax Error

* arthas: fix TLDR104

* Update pages.zh/common/arthas-trace.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages.zh/common/arthas-watch.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages.zh/common/arthas.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages.zh/common/arthas.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages.zh/common/arthas.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages.zh/common/arthas.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages/common/arthas.md

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* Update pages.zh/common/arthas-trace.md

* Apply suggestions from code review

* arthas: fix chinese translation

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
witt 2025-01-23 10:06:33 +08:00 committed by GitHub
parent 82e6800aef
commit a01593db31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# arthas-trace
> 方法内部调用路径,并输出方法路径上的每个节点上耗时。
> 另见 `arthas`, `arthas-watch`.
> 更多信息:<https://arthas.aliyun.com/en/doc/trace.html>.
- 追踪方法调用链:
`trace {{class-pattern}} {{method-pattern}}`
- 追踪方法调用链,仅显示大于 10 毫秒的调用:
`trace {{class-pattern}} {{method-pattern}} '#cost > {{10}}'`
- 追踪多个类和方法的调用:
`trace -E {{class-pattern1|class-patter2}} {{method-pattern1|method-pattern2|method-pattern3}}`
- 仅显示大于 10 毫秒的调用链,观测 10 次:
`trace {{class-pattern}} {{method-pattern}} '#cost > {{10}}' -n 5`

View file

@ -0,0 +1,17 @@
# arthas-watch
> 函数执行数据观测。
> 另见 `arthas`, `arthas-trace`.
> 更多信息:<https://arthas.aliyun.com/en/doc/watch.html>.
- 在方法调用后观察,显示第一个参数和返回值,展开嵌套对象的 4 层:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[0],returnObj }'}} -x 4`
- 在方法调用后观测,当第一个参数的值是 5 时,显示第二个参数和返回值,展开嵌套对象的 4 层:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[1],returnObj }'}} {{'"5".equals(params[0])'}} -x 4`
- 在方法返回和异常后观测,显示第二个参数的 count 属性:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[1].count }'}} -e -s`

21
pages.zh/common/arthas.md Normal file
View file

@ -0,0 +1,21 @@
# arthas
> Java 应用诊断利器。
> 另见 `arthas-watch`, `arthas-trace`.
> 更多信息:<https://arthas.aliyun.com/en/>.
- 启动 arthas:
`java -jar {{路径/到/arthas-boot.jar}}`
- 重连 arthas (默认 3658 端口):
`telnet localhost {{端口号}}`
- 退出当前 arthas 客户端的连接,但不停止 arthas 服务:
`exit|quit|logout|q`
- 停止 arthas 服务,断开所有 arthas 客户端的连接:
`stop`

View file

@ -0,0 +1,21 @@
# arthas-trace
> Trace method invoke chain, and output the time cost for each node in the path.
> See also: `arthas`, `arthas-watch`.
> More information: <https://arthas.aliyun.com/en/doc/trace.html>.
- Trace method invoke chain:
`trace {{class-pattern}} {{method-pattern}}`
- Trace method invoke chains and only display invoke information longer than 10 ms:
`trace {{class-pattern}} {{method-pattern}} '#cost > {{10}}'`
- Trace the invoke chain of multiple classes or multiple methods:
`trace -E {{class-pattern1|class-patter2}} {{method-pattern1|method-pattern2|method-pattern3}}`
- Track method invoke chains, only display invoke information that exceeds 10 ms, and exit after 5 times:
`trace {{class-pattern}} {{method-pattern}} '#cost > {{10}}' -n 5`

View file

@ -0,0 +1,17 @@
# arthas-watch
> Method invoke data observation.
> See also: `arthas`, `arthas-trace`.
> More information: <https://arthas.aliyun.com/en/doc/watch.html>.
- Observe the first parameter and return value of method, and expand the nested attributes of the object to 4 levels:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[0],returnObj }'}} -x 4`
- When the value of the first parameter of the method is 5, the second parameter and return value are output, and the object is expanded 4 layers:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[1],returnObj }'}} {{'"5".equals(params[0])'}} -x 4`
- When the method returns or an exception occurs, observe the count property of the second parameter:
`watch {{class-pattern}} {{method-pattern}} {{'{ params[1].count }'}} -e -s`

21
pages/common/arthas.md Normal file
View file

@ -0,0 +1,21 @@
# arthas
> Java diagnostic tool.
> See also: `arthas-watch`, `arthas-trace`.
> More information: <https://arthas.aliyun.com/en/>.
- Start Arthas:
`java -jar {{path/to/arthas-boot.jar}}`
- Reconnect Arthas (default port used by Arthas is 3658):
`telnet localhost {{port_number}}`
- Exit the current Arthas client without affecting other clients. equals `exit``logout``q` command:
`exit|quit|logout|q`
- Terminate the Arthas server, all the Arthas clients connecting to this server will be disconnected:
`stop`