使用jconsole 对java springBoot项目进行性能监测

前言 部署到win 服务骑上的java程序内存占用过高,想查看一下程序资源使用详情,可以使用jConsole,但是在服务器打开jConsole却无法找到本地运行的java程序。

服务器启动项目的方式如下

java -jar bwbd-1.0.0.jar

本地无法找到需要检测的程序我就把注意打到了远程上去了,启动java时使用如下命令

java -jar -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9192 -Dcom.sun.management.jmxremote.rmi.port=9193 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false bwbd-1.0.0.jar

然后使用下面的远程进程:

 OK

原文地址:https://www.cnblogs.com/guanxiaohe/p/13130943.html