ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Arthas 使用

2022-03-08 12:35:44  阅读:208  来源: 互联网

标签:tt Arthas dropwizard report io 使用 metrics5 true


 

1 调用bean中的某个方法:

#抓取 'io.dropwizard.metrics5.ScheduledReporter.report()'
tt -t io.dropwizard.metrics5.ScheduledReporter report params.length==0 -n 1
#tt列表查看
[arthas@1463]$ tt -l INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1000 2022-03-04 19:44:24 66.333827 true false 0x35edfcef GarbageFreeScheduledReporter report 1001 2022-03-04 19:58:21 214.109877 true false 0x46ae7821 GarbageFreeScheduledReporter report 1002 2022-03-04 19:58:21 215.242145 true false 0x46ae7821 InfluxDbReporter report 1003 2022-03-04 20:07:07 8.364167 true false 0x69ff4845 GarbageFreeScheduledReporter report Affect(row-cnt:4) cost in 1 ms.
#查看当前target
[arthas@1463]$ tt -i 1000 -w 'target' @HickwallUDPReporter[ logger=@DefaultLogger[com.xxx.framework.foundation.internals.logger.DefaultLogger@2a638bfe], DEFAULT_IDC=@String[DEFAULT-IDC], LOGGER=@Logger[Logger[io.dropwizard.metrics5.influxdb.InfluxDbReporter]], VALUE=@String[value], clock=@UserTimeClock[io.dropwizard.metrics5.Clock$UserTimeClock@927d5c], sender=@InfluxDbUdpSender[io.dropwizard.metrics5.influxdb.InfluxDbUdpSender@36244462], builder=@InfluxDbLineBuilder[io.dropwizard.metrics5.influxdb.InfluxDbLineBuilder@61b7166e], registry=@MetricRegistry[io.dropwizard.metrics5.MetricRegistry@57bd4ddd], mirror=@RegistryMirror[io.dropwizard.metrics5.influxdb.GarbageFreeScheduledReporter$RegistryMirror@4456b2eb], LOG=@Logger[Logger[io.dropwizard.metrics5.ScheduledReporter]], FACTORY_ID=@AtomicInteger[3], registry=@MetricRegistry[io.dropwizard.metrics5.MetricRegistry@57bd4ddd], executor=@DelegatedScheduledExecutorService[java.util.concurrent.Executors$DelegatedScheduledExecutorService@5045e957], shutdownExecutorOnStop=@Boolean[true], disabledMetricAttributes=@RegularEnumSet[isEmpty=false;size=7], scheduledFuture=@ScheduledFutureTask[java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@45c6db93[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@9188157[Wrapped task = io.dropwizard.metrics5.ScheduledReporter$1@34f6f60c]]], filter=@[io.dropwizard.metrics5.MetricFilter$1@3ab69d2d], durationFactor=@Long[1000000], durationUnit=@String[milliseconds], rateFactor=@Long[1], rateUnit=@String[second], ]
#调用bean 中的stop()方法
tt -i 1000 -w 'target.stop()'

 

转自:

https://arthas.aliyun.com/doc/tt.html (官方手册)
https://github.com/alibaba/arthas/issues/482 (Alibaba Arthas实践--获取到Spring Context)

 

标签:tt,Arthas,dropwizard,report,io,使用,metrics5,true
来源: https://www.cnblogs.com/ylz8401/p/15979872.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有