arthas 开源神器使用说明

先需要下载好 arthas工具:官网链接 https://github.com/alibaba/arthas/blob/master/README_CN.md

下载方式:curl -O https://arthas.aliyun.com/arthas-boot.jar  

运行 arthas:java -jar arthas-boot.jar

阿里开源 arthas 帮助命令一览表
命令 命令描述 中文描述
help  Display Arthas Help 查看命令帮助信息
keymap Display all the available keymap for the specified connection. Arthas快捷键列表及自定义快捷键
sc Search all the classes loaded by JVM 查看JVM已加载的类信息
sm Search the method of classes loaded by JVM   查看已加载类的方法信息
classloader Show classloader info 查看classloader的继承树,urls,类加载信息
jad Decompile class 反编译指定已加载类的源码
getstatic Show the static field of a class 通过getstatic命令可以方便的查看类的静态属性
monitor Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc. 方法执行监控
stack Display the stack trace for the specified class and method 输出当前方法被调用的调用路径
thread Display thread info, thread stack 查看当前线程信息,查看线程的堆栈
trace Trace the execution time of specified method invocation.   方法内部调用路径,并输出方法路径上的每个节点上耗时
watch Display the input/output parameter, return object, and thrown exception of specified method invocation   方法执行数据观测
tt Time Tunnel        方法执行数据的时空隧道,记录下指定方法每次调用的入参和返回信息,并能对这些不同的时间下调用进行观测
jvm Display the target JVM information                 查看当前JVM信息
perfcounter Display the perf counter infornation.            查看当前JVM的 Perf Counter信息
ognl Execute ognl expression.             执行ognl表达式
mc Memory compiler, compiles java files into bytecode and class files in memory.      Memory Compiler/内存编译器,编译.java文件生成.class
redefine Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)   加载外部的.class文件,redefine jvm已加载的类。
dashboard Overview of target jvm's thread, memory, gc, vm, tomcat info.        当前系统的实时数据面板,按 ctrl+c 退出。
dump Dump class byte array from JVM           dump 已加载类的 bytecode 到特定目录
heapdump Heap dump          dump java heap, 类似jmap命令的heap dump功能
options View and change various Arthas options               全局开关
cls Clear the screen               清空当前屏幕区域
reset Reset all the enhanced classes                                                                             重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端关闭时会重置所有增强过的类
version Display Arthas version 输出当前目标 Java 进程所加载的 Arthas 版本号
session Display current session information  查看当前会话的信息
sysprop Display, and change the system properties.             查看当前JVM的系统属性(System Property)
sysenv Display the system env.            查看当前JVM的环境属性(System Environment Variables)                                                      
vmoption Display, and update the vm diagnostic options. 查看,更新VM诊断相关的参数
logger Print logger info, and update the logger level   查看logger信息,更新logger level
history Display command history                  打印命令历史
cat Concatenate and print files    打印文件内容,和linux里的cat命令类似。
echo write arguments to the standard output   打印参数,和linux里的echo命令类似。
pwd Return working directory name        返回当前的工作目录,和linux命令类似
mbean Display the mbean information                      查看 Mbean 的信息
grep grep command for pipes.          类似传统的grep命令。
tee tee command for pipes. 类似传统的tee命令, 用于读取标准输入的数据,并将其内容输出成文件。
profiler Async Profiler. https://github.com/jvm-profiling-tools/async-profiler 使用async-profiler生成火焰图
stop Stop/Shutdown Arthas server and exit the console. 关闭 Arthas 服务端,所有 Arthas 客户端全部退出

文章最后,给大家推荐一些受欢迎的技术博客链接

  1. JAVA相关的深度技术博客链接
  2. Flink 相关技术博客链接
  3. Spark 核心技术链接
  4. 设计模式 —— 深度技术博客链接
  5. 机器学习 —— 深度技术博客链接
  6. Hadoop相关技术博客链接
  7. 超全干货--Flink思维导图,花了3周左右编写、校对
  8. 深入JAVA 的JVM核心原理解决线上各种故障【附案例】
  9. 请谈谈你对volatile的理解?--最近小李子与面试官的一场“硬核较量”
  10. 聊聊RPC通信,经常被问到的一道面试题。源码+笔记,包懂
  11. 深入聊聊Java 垃圾回收机制【附原理图及调优方法】

欢迎扫描下方的二维码或 搜索 公众号“大数据高级架构师”,我们会有更多、且及时的资料推送给您,欢迎多多交流!

                                           

       

猜你喜欢

转载自blog.csdn.net/weixin_32265569/article/details/108116192