Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration method of jconsole,jvisualvm Monitoring jvm

2025-02-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report