-
使用方式
jmap [options] pid
-
-clstats pid
连接到正在运行的进程并打印Java堆的类装入器统计信息。如下图
clstats示例.png -
finalizerinfo示例.png-finalizerinfo pid
连接到正在运行的进程并打印关于等待结束的对象的信息。如下图
-
histo示例.png-histo[:live] pid
连接到正在运行的进程并打印Java对象堆的直方图。如果指定了live子选项,那么它只计数活动对象。
-
-
-dump:<dump options> pid
以hprof二进制格式,转储Java堆。<dump options>选项如下- live — When specified, dumps only the live objects; if not specified, then dumps all objects in the heap.
- format=b — Dumps the Java heap,. in hprof binary format
-
file=filename — Dumps the heap to filename
dump示例.png
-
-heap pid
打印java堆信息。如下
Parallel GC with 8 thread(s) //jvm采用什么垃圾回收器
Heap Configuration:
MinHeapFreeRatio = 0 //jvm堆内存最小空闲比例,-XX:MinHeapFreeRatio=40低于这个值将扩展
MaxHeapFreeRatio = 100 //jvm堆内存最大空闲比例,-XX:MaxHeapFreeRatio=70超过这个值将收缩
MaxHeapSize = 2111832064 (2014.0MB) //jvm堆最大值
NewSize = 44040192 (42.0MB) //jvm新生代默认值
MaxNewSize = 703594496 (671.0MB)//jvm新生代最大值
OldSize = 88080384 (84.0MB)//jvm老年代默认值
NewRatio = 2 //新生代和老年代比例 1:2
SurvivorRatio = 8 //survivor和eden比例 1:8
MetaspaceSize = 21807104 (20.796875MB) //元空间默认值
CompressedClassSpaceSize = 1073741824 (1024.0MB) //
MaxMetaspaceSize = 17592186044415 MB //元空间最大值
G1HeapRegionSize = 0 (0.0MB) //
Heap Usage:
PS Young Generation
Eden Space:
capacity = 147324928 (140.5MB)
used = 1841560 (1.7562484741210938MB)
free = 145483368 (138.7437515258789MB)
1.2499989139651912% used
From Space:
capacity = 11010048 (10.5MB)
used = 0 (0.0MB)
free = 11010048 (10.5MB)
0.0% used
To Space:
capacity = 12058624 (11.5MB)
used = 0 (0.0MB)
free = 12058624 (11.5MB)
0.0% used
PS Old Generation
capacity = 95944704 (91.5MB)
used = 11275232 (10.752899169921875MB)
free = 84669472 (80.74710083007812MB)
11.751802371499316% used
16005 interned Strings occupying 1509768 bytes.
网友评论