How to read the output of "jstat -gcutil <PID>?"

8.4k views Asked by At

I am running a JBoss server and following output belong to -gcutil tool. I am curious what is this abbreviations.

/usr/java/jdk1.7.0_25/bin/jstat  -gcutil 47929 
  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
  0.00   0.00  68.46 100.00  57.08  44539 5829.704 303497 241552.104 247381.808

Thanks

2

There are 2 answers

0
nuriselcuk On BEST ANSWER

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.

Refer the documentation at https://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html#gcutil_option

Additionally you can refer http://www.cs.lafayette.edu/docs/java/tooldocs/share/jstat.html also.

0
lambda.xy.x On

To expand a little on @nurselcuk's answer: the memory is devided into heap space (where objects are alocated) and permanent space P (where the bytecode for classes is stored. Heap space is further divided into the young Y and tenured / old generation O. The young generation consists of eden space E, and two survivor spaces S0 and S1.

Objects are allocated into eden space. When eden space runs out, the garbage collector moves live objects into survivor space and frees eden space.

When survivor space runs out, the garbage collector usually moves live objects within survivor space. It seems that survivor space 0 and 1 again work like a copying collector where objects are only allocated into one space while the other stays free. When the current space is full, all live objects are moved to the free space and the two spaces switch roles. If an object has been collected a certain number of times, it is moved to tenured space.

Tenured space is also garbage collected by a mark and sweep algorithm.