jmap使用

原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11484713.html

 

使用 -heap 查看heap空间概要

1 jmap -heap 41565 > ~/jmap.txt  

Console Output

 1 Attaching to process ID 41565, please wait...  
 2 Debugger attached successfully.  
 3 Server compiler detected.  
 4 JVM version is 25.131-b11  
 5   
 6 using parallel threads in the new generation.  
 7 using thread-local object allocation.  
 8 Concurrent Mark-Sweep GC  
 9   
10 Heap Configuration:  
11    MinHeapFreeRatio         = 40  
12    MaxHeapFreeRatio         = 70  
13    MaxHeapSize              = 1073741824 (1024.0MB)  
14    NewSize                  = 89456640 (85.3125MB)  
15    MaxNewSize               = 348913664 (332.75MB)  
16    OldSize                  = 178978816 (170.6875MB)  
17    NewRatio                 = 2  
18    SurvivorRatio            = 8  
19    MetaspaceSize            = 21807104 (20.796875MB)  
20    CompressedClassSpaceSize = 1073741824 (1024.0MB)  
21    MaxMetaspaceSize         = 17592186044415 MB  
22    G1HeapRegionSize         = 0 (0.0MB)  
23   
24 Heap Usage:  
25 New Generation (Eden + 1 Survivor Space):  
26    capacity = 314048512 (299.5MB)  
27    used     = 314048496 (299.49998474121094MB)  
28    free     = 16 (1.52587890625E-5MB)  
29    99.99999490524573% used  
30 Eden Space:  
31    capacity = 279183360 (266.25MB)  
32    used     = 279183360 (266.25MB)  
33    free     = 0 (0.0MB)  
34    100.0% used  
35 From Space:  
36    capacity = 34865152 (33.25MB)  
37    used     = 34865136 (33.24998474121094MB)  
38    free     = 16 (1.52587890625E-5MB)  
39    99.99995410890507% used  
40 To Space:  
41    capacity = 34865152 (33.25MB)  
42    used     = 0 (0.0MB)  
43    free     = 34865152 (33.25MB)  
44    0.0% used  
45 concurrent mark-sweep generation:  
46    capacity = 724828160 (691.25MB)  
47    used     = 724828160 (691.25MB)  
48    free     = 0 (0.0MB)  
49    100.0% used  
50   
51 38460 interned Strings occupying 4469136 bytes. 

使用 -histo:live 查看内存中有哪些对象

1 jmap -histo:live 41565 > ~/jmap.txt  

 

Reference

https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jmap.html

https://www.cnblogs.com/yjd_hycf_space/p/7753847.html

 

转载于:https://www.cnblogs.com/agilestyle/p/11484713.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值