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

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).

主站蜘蛛池模板: 德保县| 甘孜| 郑州市| 潍坊市| 汤原县| 金塔县| 黄石市| 望奎县| 逊克县| 民权县| 晋州市| 盐津县| 海安县| 谢通门县| 泌阳县| 芒康县| 抚松县| 秭归县| 涟源市| 赤城县| 安乡县| 江安县| 察哈| 高陵县| 江口县| 安塞县| 神农架林区| 新余市| 贵溪市| 金湖县| 焉耆| 石阡县| 田林县| 文成县| 灵丘县| 黄大仙区| 岳阳县| 泉州市| 桃江县| 印江| 天台县|