请求追踪命令trace
语法:
trace 全类名 请求方法
实例
trace com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper getAMService
反编译命令jad
语法:
jad -source-only 全类名
实例:
jad -source-only com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper
输出到指定目录文件
jad -source-only com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper > C:\Users\Administrator\Desktop\bdclog\ArchiveMgmtServiceHelper.jave
利用watch命令监听请求方法的入参和返回值和异常信息
语法:
watch 全类名 方法名 '{params,returnObj,throwExp}' -x 2
实例
watch com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper getAMService '{params,returnObj,throwExp}' -x 2
其中:params表示请求入参,returnObj表示返回值,throwExp表示异常信息
利用ognl查看全局变量的值
语法:
ognl ‘@全类名@变量名称’
实例
ognl '@com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper@setAMService'
如果上述命名报错则搭配下面命令一起使用
先用sc -d 命令获取类的classloderId
sc -d com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper
然后用ognl -c classloderId 执行获取变量值
ognl -c 71f16c1e '@com.gisquest.platform.modules.bizmodel.helper.ArchiveMgmtServiceHelper@setAMService'
arthas官方命令
简介 | arthas