watch
查看session中的属性
watch *.ApplyInstanceController list '{params[0].request.session.session.attributes.systemUser}' -n 1 -x 3
查看httpServletRequest paramter
watch *.x x 'params[0].request.parameters.paramHashValues.publishCode' -n 4 -x 3
查看ArrayList的第几个数据
watch *.QueryServiceImpl queryIpInfoByGroup '{params[0].get(1)}' -n 3 -x 3
查看目标对象的变量(这里使用的是ognl表达式)
watch *.QueryServiceImpl handle '{target,target.profile}' -n 1 -x 3
查看执行的sql (mysql) 测试坏境不频繁可以使用。 太频繁的获取不到 ```bash watch com.mysql.jdbc.ConnectionImpl execSQL ‘{params[0].originSql}’ -n 5 -x 3 —mysql 驱动
watch org.apache.ibatis.executor.statement.PreparedStatementHandler query ‘{params[0]}’ -n 5 -x 1 ‘params[0].wrapper.asSql().contains(“sql的内容”)’
<a name="GExbS"></a>
### monitor
- 查看某一个用户的执行频繁
```bash
monitor *.MyMessageClientListener handleTag "params[0].fourth.{?#this.nick=='vavaxinxin'}" -c 5
ognl
查看静态字段(private,public)
ognl '@io.github.bootmybatis.service.QueryServiceImpl@ddss'
trace
ognl 条件过滤
trace com.raycloud.operation.ons.Tmc.MyMessageClientListener handleRefundCreate -n 5 'params[0].fourth.id=="2525634019"'
stace
-
vmtool 查看实例数量 or 调用实例方法
[arthas@94110]$ vmtool --action getInstances --className com.raycloud.api.open.service.open.OpenService -l 1 --express 'instances[0].getProjectDetails()'
@ListApiProjectResponse[
listApiDetails=@ArrayList[isEmpty=false;size=3],
errcode=@Integer[0],
code=@Integer[0],
errmsg=@String[成功],
success=@Boolean[true],
]
[arthas@94110]$ vmtool --action getInstances --className com.raycloud.api.open.service.open.OpenService -l 1 --express 'instances[0].getProjectDetails()' -x 10
@ListApiProjectResponse[
listApiDetails=@ArrayList[
@ListApiDetail[
projectId=@String[7],
projectName=@String[测试zzz],
categories=@ArrayList[
@Category[com.raycloud.api.common.model.api.document.web.model.resp.ListApiProjectResponse$Category@32ed81c5],
],
],
@ListApiDetail[
projectId=@String[10],
projectName=@String[ccccc],
categories=@ArrayList[
@Category[com.raycloud.api.common.model.api.document.web.model.resp.ListApiProjectResponse$Category@ae91d37a],
],
],
@ListApiDetail[
projectId=@String[11],
projectName=@String[FFF],
categories=@ArrayList[
@Category[com.raycloud.api.common.model.api.document.web.model.resp.ListApiProjectResponse$Category@2157f8],
],
],
],
errcode=@Integer[0],
code=@Integer[0],
errmsg=@String[成功],
success=@Boolean[true],
]
vmtool真的强呀