编程知识 cdmana.com

Summary of several common commands of JDK

Linux Next JDK Check your own jvm Several common forms of information commands

jps (java ps)- Let me see the details

command meaning
jps Output pid And process simple name
jps -l Output pid And the full package name , Apply the main class name ,jar The full pathname of
jps -m Output main method Parameters of
jps -v Output pid name Output jvm Parameters

jstat- Let me see the details

command meaning
jstat -gc pid 1s 100 Once a second , perform 100 Time , All units are kb
jstat -gccapacity pid 1s 100 Java The maximum and minimum space used in each area of the heap
jstat -gcutil pid 1s 100 Focus on the percentage of used space in this space
jstat -gcnew pid 1s 100 Count the new generation of gc situation
jstat -gcnewcapacity pid 1s 100 Care for new The largest and newest spaces in the district
jstat -gcold pid 1s 100 Statistics old District , In the pile of old age gc situation
jstat -gcoldcapacity pid 1s 100 Statistics old The maximum and minimum capacity of each partition in the zone
jstat -gcmetacapacity pid 1s 100 Look at meta space gc situation
jstat -class pid 1s 10 Monitor class loading 、 Unloading quantity , Total space 、 Class loading time
jstat -compiler pid Output jit Compiler compiled method time and other information

jinfo- Let me see the details

command meaning
jinfo pid Print all information
jinfo -flags pid The output is the default value and the command line jvm Information settings

jmap- Let me see the details

command meaning
jmap -heap pid Print heap Summary information for ,GC The algorithm used ,heap( Pile up ) Configuration and JVM Heap memory usage
jmap -histo:live pid > histo.txt Print the histogram of the heap . For each Java class , Number of objects to be printed 、 Memory size ( In bytes ) And fully qualified class names .
jmap -finalizerinfo pid Print the information of the object waiting to be recycled

jstack- Let me see the details

command meaning
jstack -l pid Print Java Thread Java Stack trace

Copyright and License-- I’m link too

The MIT License (MIT)


版权声明
本文为[Please call me elder martial brother__]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/01/20210106125448039l.html

Scroll to Top