Arthas安装及使用

深碍√TFBOYSˉ_ 2022-03-22 04:13 376阅读 0赞

写在前面

Arthas是阿里爸爸开源出来的一款java监控工具,命令行操作,完全面向开发人员,其专业行令人发指.

安装过程

  1. wget https://alibaba.github.io/arthas/arthas-boot.jar
  2. java -jar arthas-boot.jar

下载完jar包之后需要联网下载相关的jar包,当然这些操作都是arthas-boot.jar自动执行的

相关命令介绍

由于官方文档给的已经很全了我这里就工作中比较常用的几个命令描述下

  1. NAME DESCRIPTION
  2. help Display Arthas Help
  3. keymap Display all the available keymap for the specified connection.
  4. sc Search all the classes loaded by JVM
  5. sm Search the method of classes loaded by JVM
  6. classloader Show classloader info
  7. jad Decompile class
  8. getstatic Show the static field of a class
  9. monitor Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
  10. stack Display the stack trace for the specified class and method
  11. thread Display thread info, thread stack
  12. trace Trace the execution time of specified method invocation.
  13. watch Display the input/output parameter, return object, and thrown exception of specified method invocation
  14. tt Time Tunnel
  15. jvm Display the target JVM information
  16. ognl Execute ognl expression.
  17. dashboard Overview of target jvm's thread, memory, gc, vm, tomcat info.
  18. dump Dump class byte array from JVM
  19. options View and change various Arthas options
  20. cls Clear the screen
  21. reset Reset all the enhanced classes
  22. version Display Arthas version
  23. shutdown Shutdown Arthas server and exit the console
  24. session Display current session information
  25. sysprop Display, and change the system properties.
  26. sysenv Display the system env.
  27. redefine Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
  28. history Display command history

dashboard.png

官方文档

官方文档真的已经很想详细了(阿里爸爸很良心)

  • 中文文档地址
  • 英文文档地址

发表评论

表情:
评论列表 (有 0 条评论,376人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Arthas使用

    启动 在命令行执行(使用和目标进程一致的用户启动,否则可能attach失败): java -jar arthas-boot.jar ![watermark_t