jvisual monitoring tool of the JVM

 

VisualVM (All-in-One Java Trouble shootingTool) function with the JDK release is by far the most powerful operational monitoring and troubleshooting procedures, and can be expected virtual machine troubleshooting tools in the next period of time is the main official development .
VisualVM official in the software's written on "All-in-One" description words, it indicates that in addition to operational monitoring, troubleshooting, but also provides many other features. Such as performance analysis Profiling), VisualVM performance analysis functions even compared Profiling tools JProfiler, YourKit and other professional fees will not be much less, but VisualVM there is a big advantage: the program does not need to be monitored based on the special Agent operation, thus affecting its application in the actual performance is small, so that it can be directly applied in a production environment. This advantage is JProfiler, YourKit of other tools can not be compared.

At the command line, type jvisualvm:

 

 

 

You can directly see the local java threads started those same jvisualvm also supports remote connection, remote connection to remotely configure a blog (jconsole monitoring tool of the JVM) on Reference: https://www.cnblogs.com/cheng21553516/p/ 11241237.html

Remote local connection as follows:

First, enter the name of the remote host and display name:

 

Next is the right to add JMX link:

 

 

FIG configuration:

 

Normal link to a remote: remote tomcat can see process information:

 

 

 

 

VisualVM能做到什么?VisualVM可以做到:
1、显示虚拟机进程以及进程的配置、环境信息(jps、jinfo)。
2、监视应用程序的CPU、GC、堆、方法区以及线程的信息(jstat、jstack)。
3、dump以及分析堆转储快照(jmap、jhat)。
4、方法级的程序运行性能分析,找出被调用最多、运行时间最长的方法。
5、离线程序快照:收集程序的运行时配置、线程dump、内存dump等信息建立一个快照,可以将快照发送开发者处进行Bug反馈。

面板各项参数作用介绍:

和JConsole差不多,很多显示的东西都是重合的JVM参数和我们用jps输出的是一样的,系统属性和我们用命令jinfo -sysprops看到的是一样的。如图所示:

概述页签可以看到java 进程的一些属性参数和JVM参数:

 

 

(2)监视
和我们的JConsole界面显示的很类似对吧。堆的大小、元数据空间的大小等等。堆dump就是可以导出我们当前线程的堆转储文件,其实就相当于我们jdk的命令行中执行jmap的命令。

如图所示:监视页签可以从CPU占用,堆内存占用,元数据空间大小,以及线程数等维度进行监控,同样也可以进行来及回收,对快照分析等:

 

 

 

(3)线程
同样也有Dump,同样是和我们JDK命令行工具的jstack是一样的操作。可以生成虚拟机当前时刻的线程快照。如图所示:

 线程页签可以从线程的状态,以及线程快照进行分析:

 

 

Guess you like

Origin www.cnblogs.com/cheng21553516/p/11241661.html