Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpreting jstat results

I am new to jstat tool. Therefore I did a sample as below.

./jstat -gcutil -t 4001 5000 Timestamp         S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT        565088.4   0.00   0.89  75.86  40.59  84.80    405    3.822     4    0.549    4.371        565093.4   0.00   0.89  77.81  40.59  84.80    405    3.822     4    0.549    4.371        565098.4   0.00   0.89  77.81  40.59  84.80    405    3.822     4    0.549    4.371        565103.5   0.00   0.89  77.85  40.59  84.80    405    3.822     4    0.549    4.371        565108.5   0.00   0.89  77.85  40.59  84.80    405    3.822     4    0.549    4.371        565113.4   0.00   0.89  77.85  40.59  84.80    405    3.822     4    0.549    4.371   jstat -gc output   S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC     YGCT    FGC    FGCT     GCT 704.0  704.0   0.4    0.0    6080.0   4013.8   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 704.0  704.0   0.4    0.0    6080.0   4016.6   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 704.0  704.0   0.4    0.0    6080.0   4135.4   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 704.0  704.0   0.4    0.0    6080.0   4135.4   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 704.0  704.0   0.4    0.0    6080.0   4135.4   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 704.0  704.0   0.4    0.0    6080.0   4135.4   14928.0     6335.2   21248.0 18019.6    436    3.957   4      0.549    4.506 

What does this results indicates? Which are the columns to look out for possible memory problem e.g. memory leak etc.

like image 567
new14 Avatar asked Jan 22 '13 17:01

new14


People also ask

How to use jstat?

From the jstat usage message, we learn that the jstat command-line tool is executed by running the name of the command first ( jstat ) with the hyphenated option name next, followed by the optional -t and/or -h flags, followed by a vimid, and concluding with an optional interval and optional count of the number of ...

What is a jstat?

jstat is a simple utility tool, that is present in JDK to provide JVM performance-related statistics like garbage collection, compilation activities. The major strength of jstat is its ability to capture these metrics dynamically when JVM is running without any pre-requisite instrumentation.

What is Survivor space in Java heap?

Survivor Space: The pool containing objects that have survived the garbage collection of the Eden space. Tenured Generation or Old Gen: The pool containing objects that have existed for some time in the survivor space.


1 Answers

gcutil gives stats in terms of percentage utilization

-gcutil Option Summary of Garbage Collection Statistics  Column  Description S0      Survivor space 0 utilization as a percentage of the space's current capacity. S1      Survivor space 1 utilization as a percentage of the space's current capacity. E       Eden space utilization as a percentage of the space's current capacity. O       Old space utilization as a percentage of the space's current capacity. P       Permanent space utilization as a percentage of the space's current capacity. YGC     Number of young generation GC events. YGCT    Young generation garbage collection time. FGC     Number of full GC events. FGCT    Full garbage collection time. GCT     Total garbage collection time. 

gc gives statistics in terms of alloted space and utilized space.

-gc Option Garbage-collected heap statistics  Column  Description S0C     Current survivor space 0 capacity (KB). S1C     Current survivor space 1 capacity (KB). S0U     Survivor space 0 utilization (KB). S1U     Survivor space 1 utilization (KB). EC      Current eden space capacity (KB). EU      Eden space utilization (KB). OC      Current old space capacity (KB). OU      Old space utilization (KB). PC      Current permanent space capacity (KB). PU      Permanent space utilization (KB). YGC     Number of young generation GC Events. YGCT    Young generation garbage collection time. FGC     Number of full GC events. FGCT    Full garbage collection time. GCT     Total garbage collection time. 

Source : Docs

like image 89
Aniket Thakur Avatar answered Sep 21 '22 18:09

Aniket Thakur