[Java] How to monitor application information in real time using JConsole

less than 1 minute read

Overview

A tool called JConsole is provided for real-time monitoring of application information. I will keep a memo about how to use this JConsole.

Verification environment

  • Eclipse Oxygen.3a Release (4.7.3a)
  • Java8
  • JConsole 1.8.0_162-b12

JConsole location

image.png

JConsole is stored as exe in the bin folder of JDK, and you can start it by directly clicking “jconsole.exe”.

How to use JConsole

image.png When JConsole is started, the above screen is displayed. For example, select the process you want to monitor from “Local Process” and click the “Connect” button.

image.png If the above screen appears, click the “Unprotected connection” button if there is no particular problem. (This time it is a local connection so there is no particular problem)

image.png As above screen

  1. Heap memory usage
  2. thread
  3. class
  4. CPU usage You can check.

If you want to see more detailed information, open each tab and check.

Memory tab

image.png

Thread tab

image.png

Class tab

image.png

VM summary

image.png

MBeans

image.png