一、ps -ef | grep java
二、jps -l
注:6417和29076是我们关心的LVMID,即虚拟机进程ID
三、jstat -gc 6417
说明:
- S0C:Current survivor space 0 capacity (KB).
- S1C:Current survivor space 1 capacity (KB).
- S0U:Current survivor space 0 utilization (KB).
- S1U:Current 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.
四、jinfo 6417
-Xms:起始堆内存256m
-Xmx:最大堆内存512m
-XX:PermSize:起始永久代48m
-XX:MaxPermSize:最大永久代48m
没有配置的参数:
-XX:newSize:起始新生代内存
-XX:MaxNewSize:最大新生代内存
新生代中默认Eden和S0(或S1)的比例为8比1
五、./jstack 6417