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
网友评论