240110-arthas命令vmtool

106 阅读1分钟

参考文章:

大佬文章:juejin.cn/post/729193…
学会了arthas命令vmtool,可以尽情invoke方法。妙啊!
arthas官网:arthas.aliyun.com/doc/vmtool.…

具体步骤:

  1. 查看类加载的classLoaderHash
sc -d com.xxx  
  1. idea的arthas工具,选vmtool,粘入刚刚的classLoaderHash
示例:vmtool -x 3 --action getInstances --className com.yonyou.oa.official.controller.rest.circulation.msg.CirculationMsgSender  --express 'instances[0].finishWithYht("0000LHJ1EYWR829AMA0000","ec6f0bee-440b-49d4-8e9e-275e459d84f3","1904890503586381830")'  -c 68c9d179