todo

远程调试分析java程序jmx

up:2021-11-09 14:05:08 edit:2022-02-08 14:44:28 view:724

1. 基于jstatd

https://www.cnblogs.com/easonjim/p/7483739.html

http://www.gd67.com/article/articledetail.php?id=225

1.1 动态开启Jmx: jcmd PID ManagementAgent.start jmxremote.port=9080 jmxremote.ssl=false jmxremote.authenticate=false

2. 基于远程x server

vcxsrv https://sourceforge.net/projects/vcxsrv/

windows 的 xserver,不怎么维护,不过可用

II. DISPLAY=YOU_LOCAL_SERVER:0 jconsole 或  DISPLAY=YOU_LOCAL_SERVER:0 jvisualvm

有个坑,jvisualvm启动失败,但无提示,jconsole会提示缺少 libXext.so.6: cannot open shared object file: No such file or directory

yum install libXext

yum install libXrender

yum install libXtst

后可正常使用


III. jvisualvm 离线安装plugin https://blog.csdn.net/a704397849/article/details/101292568


4.运程调试的话需要增加启动配置参数

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

然后attache


not in sinaapp