[JAVA] [JVM] Summary when stumbling with jstat

Introduction

Summarize what got stuck when using jstat

Stumble when starting jstat

When I try to use jstat on remote desktop, I get the following error 1234 is the JVM PID

cmd


>jstat -gcutil 1234 1000
1234 not found

Conclusion

When starting jstat on remote desktop It seems to be useless unless "PsEsec" is used

procedure

Download PsEsec

PsExec

Download PsEsec from the page above Store in any folder on the remote desktop This time, I chose C: \ Program Files \ PSTools.

Pass through

C:\Program Files\PSTools Add this to the system environment variable Path of the environment variable

You should now be able to do it.

Run jstat

cmd


C:\Program Files\PSTools>PsEsec64.exe -s jstat -gcutil 1234 1000

I used PsEsec64.exe because the OS of the remote desktop was 64bit. In case of 32bit, I think you can go with PsEsaec.exe.

Stumbling of output result

I didn't understand the meaning of the header, so I summarized the results of my research.

jstat Excerpt from this

-gcutil option Summary of garbage collection statistics

S0: Survivor area 0 utilization (percentage to current capacity).

S1: Survivor area 1 utilization (percentage to current capacity).

E: Eden space utilization (percentage to current capacity).

O: Old space utilization (percentage to current capacity).

M: Metaspace usage (percentage to current capacity).

CCS: Compressed class area utilization (percentage).

YGC: The number of GC events for the Young generation.

YGCT: Young generation garbage collection time.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total time for garbage collection.

S0 is Surviver From S1 is Surviver's To You can see the transition of usage rate from From to To

O is Old usage The usage rate will gradually increase

M is native memory A place that was formerly known as the heap area Up to 16 exabytes can be secured

If you know these four, you can understand the resource status.

Recommended Posts

[JVM] Summary when stumbling with jstat
Summary of initial work when creating an app with Rails
Error when playing with java
Summary of problems and countermeasures when operating IE with WebDriver of Selenium2