美文网首页
Arthas使用

Arthas使用

作者: 星城天空 | 来源:发表于2020-11-16 08:14 被阅读0次

1.代码热修复:
jad --source-only com.test.demo.dmp.constant.DmpConstant > /tmp/DmpConstant .java
vi /tmp/DmpConstant.java
sc -d com.test.demo.dmp.constant.DmpConstant | grep classLoaderHash
mc -c /tmp/DmpConstant.java -d /tmp
redefine /tmp/com/test/demo/dmp/constant/DmpConstant.class

2.查看类的静态属性
getstatic com.test.demo.dmp.utils.Constant.Switch extCallPer

3.查看值
ognl '@com.test.demo.context.SpringContextHolder@getBean("dmpRedisClusterTemplate")'

4.查看方法的耗时
trace com.test.demo.dmp.facade.DataMarkSupportServiceImpl verifyTheSupportDomain
trace com.test.demo.dmp.service.impl.TencentRtaLaunchServiceImpl evaluate '#cost > 30'

5.查看方法的出参和入参
watch com.test.demo.dmp.facade.DataMarkSupportServiceImpl requestData "{params,returnObj}" -x 2
watch com.test.demo.dmp.rta.handler.win.ClickHandler handle "{params,returnObj}" -x 3 -b -n 1
watch com.test.demo.dmp.rta.handler.win.ClickHandler handle "{params[0],throwExp}" -e -x 2

6.观察异常信息的内容
watch com.test.demo.dmp.facade.DataMarkSupportServiceImpl requestData "{params[0],throwExp}" -e -x 2 watch com.test.demo.dmp.action.monitor.ToutiaoRtaznClickMonitorAction execute "{params,returnObj}" -x 2

相关文章

  • 如何使用Arthas提高日常开发效率?

    Arthas有什么功能,怎么用,请看:Arthas使用手册[https://arthas.aliyun.com/d...

  • Arthas-Java排查神器使用

    推荐使用arthas-boot.jar方式 1、下载及安装 arthas-boot是Arthas的启动程序,它启动...

  • arthas源码分析

    arthas简介 arthas 是Alibaba开源的Java诊断工具,基于jvm Agent方式,使用Instr...

  • 排查线上CPU飙高

    1、本案例的排查过程使用的阿里开源的Arthas工具进行的,不使用arthas,使用JDK自带的命令也是可以。 2...

  • 超好用的自带火焰图的 Java 性能分析工具 Async-pro

    最近 Arthas 性能分析工具上线了火焰图分析功能,Arthas 使用 async-profiler 生成 C...

  • Arthas使用

    下载arthas-boot.jar: 然后用java -jar的方式启动: 选择一个pid进入(如1): 通过th...

  • Arthas使用

    1、写作背景 在此记录,以备遗忘 2、核心操作 2.1、Arthas安装 linux安装 wget https:/...

  • Arthas使用

    Authas — 开源的java诊断工具 下载安装 authas是一个jar包,可以直接下载后运行 就可以启动起来...

  • Arthas使用

    1.代码热修复:jad --source-only com.test.demo.dmp.constant.DmpC...

  • arthas使用

    安装 第一步:下载arthas 安装jar包 日常使用命令 详细参考:https://arthas.aliyun....

网友评论

      本文标题:Arthas使用

      本文链接:https://www.haomeiwen.com/subject/jrjnbktx.html