Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Configuration method of jconsole,jvisualvm Monitoring jvm

Shulou Source: shulou.com Published: 2022-06-01 05:01:07 10月04日 Update

Monitoring jvm in daily work is a necessary work, but it can not be monitored in real time by command line. Jconsole is a visual real-time monitoring tool. The usage of jvisualvm and jconsole are basically the same.

Personally, I prefer to use jconsole. Although the jvisualvm interface is more beautiful, the usage of each area in heap memory is not displayed. It only shows the total size of the heap and the size that has been used, and I can't see the details such as eden,surivor, so I usually use jconsole to see more details of heap memory.

1. First install jdk, find jconsole in the bin directory, and double-click to open it.

two。 It is generally installed remotely.

3. Remote monitoring can be realized only after the relevant configuration of catalina.sh in tomcat.

# add the following content to catalina.sh: CATALINA_OPTS= "$CATALINA_OPTS-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=12345-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false-Djava.rmi.server.hostname=192.168.10.59"

-Djava.rmi.server.hostname is the native IP

-Dcom.sun.management.jmxremote.port is the port for monitoring

-Dcom.sun.management.jmxremote.authenticate: whether to authenticate or not

-Dcom.sun.management.jmxremote.ssl: whether to use secure encryption

4. Restart tomcat after configuration to connect remotely

Tags: Monitoring situation mode configuration memory size details work normal beautiful secure necessary personal tendency content commands real-time that is tools interface Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology NVidia Microsoft Apple