JDK has built-in tool to monitor jvm memory usage: jstat
This is a command line tool, which runs like:
$ jstat -gc 17707 5000
where, -gc is the option, 17707 is process ID of the jvm process, 5000 is output frequency: every 5 seconds.
Following is example output:
$ jstat -gc 17707 5000
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
34944.0 34944.0 0.0 26066.5 279744.0 219021.0 699072.0 250829.1 104640.0 104498.2 47 1.055 16 4.898 5.953
34944.0 34944.0 0.0 26066.5 279744.0 219371.7 699072.0 250829.1 104640.0 104498.3 47 1.055 16 4.898 5.953
34944.0 34944.0 0.0 26066.5 279744.0 232479.2 699072.0 250829.1 104640.0 104498.8 47 1.055 16 4.898 5.953
... ...
34944.0 34944.0 1105.2 0.0 279744.0 216551.2 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 217444.3 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 219828.4 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 220063.1 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222029.5 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222160.4 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222289.1 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222417.7 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222534.9 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
34944.0 34944.0 1105.2 0.0 279744.0 222667.3 699072.0 449222.0 104640.0 104587.7 54 1.193 16 4.898 6.090
The output unit is KB.
S0C: Current (allocated) memory size of the survivor 0 -- stores new objects that survived couple of minor GCs
S1C: Current (allocated) memory size of the survivor 1 -- stores new objects that survived couple of minor GCs
S0U: Used memory size of the survivor 0
S1U: Used memory size of the survivor 1
EC: Current (allocated) memory size of the Eden -- when object created, it's put into Eden
EU: Used memory size of the Eden
OC: Current (allocated) memory size of the Old Generation -- stores objects that survived many minor GCs
OU: Used memeory of the Old Generation
PC: Current (allocated) memory size of the Permanent Generation -- stores class meta data and app constants etc
PU: Used memory of the Permanent Generation
YGC: Garbage Collection counter for Young Generation memory -- minor GC
YGT: Time (seconds) used by Garbage Collection for Young Generation memory -- minor GC
FGC: Major Garbage Collection counter for Old Generation memory - major GC
FGCT: Time used by Major Garbage Collection counter for Old Generation memory
GCT: Total time used by all Garbage Collection operations
below is diagram of jvm memory modle:
相关推荐
在JVM5.0中调配Garbage Collection 在JVM5.0中调配Garbage Collection 在JVM5.0中调配Garbage Collection
很久之前就一直在学习JVM,但是一直也没有好好的总结,最近终于有了空闲,将之前学习的内容整理成了一个PPT。PPT也可以在这里下载: https://github.com/hitynsun/docs/tree/master/JVM 也希望大神们可以批评指正...
JVM Memory Model and GC.pdf
Garbage Collection Algorithms For Automatic Dynamic Memory Management
jvm memory
The Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide describes the garbage collection methods included in the Java HotSpot Virtual Machine (Java HotSpot VM) and ...
It begins with a general introduction to JVM and the features common to the JVM languages, helping you keep abreast of its concepts. It then dives into explaining languages such as Java, Scala, ...
代码如下:failed to create jvm error code -4 这一般应是内存不够用所致,解决方法参考如下。 打开 Android Studio 安装目录下的bin目录,查找并打开文件 studio.exe.vmoptions,修改代码: 代码如下:-Xmx512m 为...
JVM Monitor 是一个 Eclipse 上的插件,用来分析Java应用程序运行的信息,包括CPU占用、线程以及内存的使用情况。
Building Memory-efficient Java Applications: Practices and Challenges Nick Mitchell, Gary Sevitsky (presenting) IBM TJ Watson Research Center Hawthorne, NY USA Copyright is held by the author/owner(s...
正常安装和配置JDK后,IntelliJ IDEA 2019.3.1 x64 启动仍然报 Failed to load JVM DLL 路径\jvm.dll if you already have a 64-bit JDK installed, define a JAVA_HOME variable in 系统 ... 必须用管理员才能打开...
Review Garbage Collection and Object References Symptoms, Causes, and Troubleshooting of Out of Memory in Java Heap Investigating Out of Native Memory Conditions Review: Process Size, Virtual vs. ...
WP - Understanding Java Garbage Collection(了解Java垃圾收集).pdf WP - C4(C4:连续并发压缩收集器).pdf WP - JVM Performance Study(JVM性能研究使用Apache Cassandra™比较OracleHotSpot®和AzulZing®).pdf
InfoQ的关于JVM GC的学习资料,对于深入学习JVM的GC机制很有帮助
Introduction to JVM Languages 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Java垃圾回收机制的工作原理,不同JVM使用的GC算法分析
JVM Debugger Memory View for Android Studio
Introduction to JVM Languages_Code 源码 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
InfoQ的关于JVM GC的学习资料,对于深入学习JVM的GC机制很有帮助
jvm日志说明文档。很详细。可以作为查找类书籍。当遇到看不懂的日志。可以在该文件上找