安装
1.解压缩arthas的压缩包
unzip arthas-packaging-bin.zip
2.安装Arthas
cd arthas
./install-local.sh
启动
以脚本的方式启动as.sh:如图为启动成功
监控命令使用
$ watch ------------------查看方法返回值
$ watch------------------查看入参和执行前的返回值
$ trace-------------------方法内部调用路径,并输出方法路径上的每个节点上耗时
monitor-----------------$ monitor test.threadClass getResult 方法执行监控
total |
调用次数 |
success |
成功次数 |
fail |
失败次数 |
rt |
平均RT |
fail-rate |
失败率 |
$ thread -n 3----------------输出当前最忙的3个线程
$ thread -b-------------------找出当前阻塞其他线程的线程
$ jvm-------------查看当前jvm信息