当前位置:网站首页>Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)

Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)

2022-08-11 00:20:00 idle cat

JVM commands

The most commonly used commands when locating and troubleshooting problems include: jps (process), jmap (memory), jstack (thread), jinfo (parameter), etc.

jps: Query all Java process information on the current machine

jmap: output memory of a Java process

jstack: print thread stack information of a Java thread

jinfo: for viewing jvm

JDK commands

jconsole monitoring interface

window, cmd, directly enter jconsole and press Enter.

jvisualvm

Window visual interface, Ctr+R, CMD, enter jvisualvm and press Enter, after opening the main interface, click [Load] under [File]

Select file type: "Heap Dump..."

Click "Open"

View the classes, you can see that different classes occupymemory size:

For example, click "java.lang.String" to enter to view the object:

The system is familiar with the parameters

Thread

Arthas

Ali detection command tool

Ali open source product components, official website: Introduction| arthas

Third-party detection software

MAT

MAT (MemoryAnalyzerTool) is a memory analysis tool provided by Eclipse. As a relatively easy-to-use tool in Java memory analysis, mastering the basic usage of MAT is basically one of the most important basic skills in positioning problems.

Download:

Link: https://pan.baidu.com/s/1Qyy1bJQtosNlJ9VOt9GzVA

Extraction code: 8hgd

Directory after decompression:

Main interface, open file, open heap dump...

Select the first one:

Interface after loading:

Jprofiler

Visual analysis tools under the window

Link: https://pan.baidu.com/s/13o34g0OCueqp_7Mn-slj3A Extraction code: vgs2

Version: JProfiler 12.0.4


原网站

版权声明
本文为[idle cat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/223/202208102346596360.html