First need to download the arthas tool: official website link https://github.com/alibaba/arthas/blob/master/README_CN.md
Download method: curl -O https://arthas.aliyun.com/arthas-boot.jar
运行 arthas : java -jararthas-boot.jar
command | Command description | Chinese description |
---|---|---|
help | Display Arthas Help | View command help information |
keymap | Display all the available keymap for the specified connection. | Arthas shortcut key list and custom shortcut keys |
sc | Search all the classes loaded by JVM | View JVM loaded class information |
sm | Search the method of classes loaded by JVM | View method information of loaded classes |
classloader | Show classloader info | View classloader inheritance tree, urls, class loading information |
jad | Decompile class | Decompile the source code of the specified loaded class |
getstatic | Show the static field of a class | You can easily view the static properties of the class through the getstatic command |
monitor | Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc. | Method execution monitoring |
stack | Display the stack trace for the specified class and method | Output the call path of the current method being called |
thread | Display thread info, thread stack | View current thread information, view thread stack |
trace | Trace the execution time of specified method invocation. | Method internal call path, and output the time-consuming on each node on the method path |
watch | Display the input/output parameter, return object, and thrown exception of specified method invocation | Method to perform data observation |
tt | Time Tunnel | The method executes the time-space tunnel of data, records the input parameters and return information of each call of the specified method, and can observe the calls at these different times |
jvm | Display the target JVM information | View current JVM information |
perfcounter | Display the perf counter infornation. | View the Perf Counter information of the current JVM |
ognl | Execute ognl expression. | Execute ognl expression |
mc | Memory compiler, compiles java files into bytecode and class files in memory. | Memory Compiler / memory compiler, compiled .java file generation.class |
redefine | Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...) | Load external .class files and redefine the loaded classes of jvm. |
dashboard | Overview of target jvm's thread, memory, gc, vm, tomcat info. | For the real-time data panel of the current system, press ctrl+c to exit. |
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 客户端全部退出 |
文章最后,给大家推荐一些受欢迎的技术博客链接:
- JAVA相关的深度技术博客链接
- Flink 相关技术博客链接
- Spark 核心技术链接
- 设计模式 —— 深度技术博客链接
- 机器学习 —— 深度技术博客链接
- Hadoop相关技术博客链接
- 超全干货--Flink思维导图,花了3周左右编写、校对
- 深入JAVA 的JVM核心原理解决线上各种故障【附案例】
- 请谈谈你对volatile的理解?--最近小李子与面试官的一场“硬核较量”
- 聊聊RPC通信,经常被问到的一道面试题。源码+笔记,包懂
- 深入聊聊Java 垃圾回收机制【附原理图及调优方法】
欢迎扫描下方的二维码或 搜索 公众号“大数据高级架构师”,我们会有更多、且及时的资料推送给您,欢迎多多交流!