我是jstat工具的新手。因此,我做了如下示例。
./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这个结果说明了什么?哪些列需要注意可能的内存问题,例如内存泄漏等。
发布于 2013-01-23 02:00:37
请参阅文档:
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html
基本上,一行是一个时间点。这些列显示了有关JVM内存区域(Survivor、Eden等)的数据,如果不知道JVM是如何工作的,就不可能理解它们。
例如,在文章JVM garbage collection in young generation中有一些解释。
此处摘录了JVM对象生成的工作原理
Eden是创建新对象的地方。当伊甸园已满时,运行small GC:如果一个对象没有对它的引用,它将被删除,否则它将继续存在,并移动到Survivor空间(一次只有一个幸存空间在使用,其他空间的所有对象都复制到那里)。
如果一个对象在一定次数的来回复制中幸存下来,它就会被移动到Old空间。如果旧空间已满,则会运行一个Full GC,这会影响JVM中的所有对象,因此它的操作要繁重得多。
此外,还有Permanent空间,其中的“元数据”(类描述符,字段,方法,...描述符)被存储。
发布于 2014-01-16 13:52:04
gcutil以利用率百分比的形式提供统计数据
-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提供已分配空间和已用空间的统计信息。
-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.来源:Docs
发布于 2015-01-03 06:16:26
使用这个简单的online jstat visualizer tool绘制jstat GC统计数据。
https://stackoverflow.com/questions/14464987
复制相似问题