当前位置:网站首页>JVM directive

JVM directive

2022-06-25 01:17:00 cavalier_ seven hundred and ninety-eight

JVM Common commands _Pluto372 The blog of -CSDN Blog _jvm command

Article reference above

1.jps

View the current JAVA process

For example, start the backend project locally 18912 This is the process of the back-end project PID

2.jinfo

Java Configuration Info, Its main function is to view and adjust in real time JVM Configuration parameters .

Output JAVA System parameters and command line parameters .

jinfo 18912 You can view it

3.jstack

It is mainly used to check Java In process thread stack information ."jstack pid" --- pid For process number , Can pass jps perhaps ps Command to find , It can be used to analyze the deadlock problem

4.jstat:

It's mainly about java Real time command line monitoring of application resources and performance , Yes, yes. heap size And garbage collection monitoring

jstat -gcutil 18912
  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT
  0.00  99.96  44.08   8.92  97.67  96.69     13    0.096     3    0.272    0.369

S0  — Heap Upper Survivor space 0 Percentage of space used in area

S1  — Heap Upper Survivor space 1 Percentage of space used in area

E   — Heap Upper Eden space Percentage of space used in area

O   — Heap Upper Old space Percentage of space used in area

P   — Perm space Percentage of space used in area

ccs: Usage after compression

YGC — Occurs from application startup to sampling Young GC The number of times

YGCT– From application startup to sampling Young GC Time spent ( Unit second )      Time consuming

FGC — Occurs from application startup to sampling Full GC The number of times

FGCT– From application startup to sampling Full GC Time spent ( Unit second )       Time consuming

GCT — Total time spent garbage collection from application startup to sampling ( Unit second )      GC Total time consuming

jstat -gc 18912

A detailed description

S0C  

The first of the young generation survivor( Survival zone ) The capacity of ( byte )

S1C  

The second of the younger generation survivor( Survival zone ) The capacity of ( byte )

S0U  

The first of the young generation survivor( Survival zone ) Space has been used ( byte )

S1U    

The second of the younger generation survivor( Survival zone ) Space has been used ( byte )

EC     

Young generation Eden( The garden of Eden ) The capacity of ( byte )

EU      

Young generation Eden( The garden of Eden ) Space has been used ( byte )

OC       

Old Generation capacity ( byte )

OU     

Old Generation has used space at present ( byte )

PC   

Perm( Lasting generation ) The capacity of ( byte )

PU

Perm( Lasting generation ) Space has been used ( byte )

YGC   

From application startup to sampling in the younger generation gc frequency

YGCT  

From application startup to sampling in the younger generation gc Time spent (s)

FGC  

From application startup to sampling old generation ( whole gc)gc frequency

FGCT   

From application startup to sampling old generation ( whole gc)gc Time spent (s)

GCT

From application startup to sampling gc The total time spent (s)

5.jmap

jmap yes JDK The tool software that comes with me , Mainly used to print specified Java process ( Or core documents 、 Remote debugging server ) Shared object memory mapping or Heap memory details

原网站

版权声明
本文为[cavalier_ seven hundred and ninety-eight]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206242035169273.html