官术网_书友最值得收藏!

How to connect remotely

Connecting locally is easy since jvisualvm will just locally look up the running JVM. But for connecting remotely, you will need some more setup.

All the communication relies on JMX and, therefore, you need to set up a remote JMX connection. This relies on what is called a connector (can be seen as a small embedded JMX server). There are multiple protocols available but out of the box; they rely on RMI communications and system properties to be configured.

To add these system properties, the fastest and easiest way is as follows:

-Dcom.sun.management.jmxremote.port=1234
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

It will enable JMX on port 1234 and disable SSL and security. For performances, we don't need more, but if you want to keep it in production, you may need to configure the security and SSL. For more details on how to do so, you can refer to the Oracle website at https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html.

Once this is configured, you just have to right-click on the Local item in the tree on the left side, select Add JMX Connection, and fill in the related information (host/port and the potential credentials if you've configured the security).

主站蜘蛛池模板: 青州市| 神木县| 凭祥市| 万盛区| 元氏县| 绵阳市| 江华| 牡丹江市| 灵武市| 泗洪县| 花垣县| 雅江县| 和硕县| 麟游县| 河西区| 祁门县| 苍山县| 自贡市| 会东县| 庆阳市| 喀什市| 科技| 共和县| 嘉鱼县| 清水县| 黄山市| 柳河县| 台东县| 阳新县| 济宁市| 辽中县| 务川| 冕宁县| 钦州市| 余姚市| 奇台县| 涡阳县| 大荔县| 厦门市| 固安县| 龙陵县|