Jconsole monitors tomcat JVM memory, threads, CPU, and jconsolejvm
JConsole was introduced from Java 5 to monitor Java application performance and trace Java code. Jconsole is a built-in JDK monitoring tool. You only need to find the JDK installation path, open the bin folder, and double-clickJconsoleYou can.
0. Preparations before monitoring
Write the code to tomcat/bin/catalina. sh.
CATALINA_OPTS=-Djava.awt.headless=true
JAVA_OPTS="-Djava.rmi.server.hostname=192.168.0.1 $JAVA_OPTS -Dprogram.name=$PROGNAME -Dcom.sun.management.jmxremote.port=8533 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
1. Create a new connection
Here we only talk about remote monitoring of Linux tomcat. input the following content based on usage:
192.168.0.1:8533
Click "Connect" to enter the Console
Hello everyone, I want to monitor the memory usage of TOMCAT threads in real time. Is there any such tool?
In your jdk package, there is a visual VM that can monitor all the java applications on your machine. Double-click it to make it easy and practical.
The more powerful is jprofile. The more powerful, the more abnormal it is, the more expensive it is --
What tools are usually used to monitor tomcat and oracle parameters during the testing of the javaEE project?
Monitor tomcat:
The lightweight jconsole tool provided by JAVA can be used directly. The memory, cpu, and thread can be monitored.
Commercial or paid users have JPROFILER, which is similar to the upstairs, and also optimizes the analysis function. However, it may affect the performance during monitoring.
Oracle monitoring:
1. We recommend that you only monitor the cpu, memory, swap-in and swap-out, read/write, etc. of the oracle server. If there is a bottleneck in oracle, such as slow connection retrieval (printed in the program, connection retrieval, read/write time, etc.), export the awr report to analyze the cause.