1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/arthas-watch.md
witt a01593db31
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>
2025-01-23 10:06:33 +08:00

793 B

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