jmap <Options> pid
參數如下:
-heap:打印jvm heap的情況
-histo:打印jvm heap的直方圖。其輸出信息包括類名,對象數量,對象佔用大小。
-histo:live :只打印存活對象的情況
-permstat:打印permanent generation heap情況
[root@localhost ~]# jmap -heap 19600
Attaching to process ID 19600, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.221-b11
using thread-local object allocation.
Parallel GC with 2 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 515899392 (492.0MB)
NewSize = 11010048 (10.5MB)
MaxNewSize = 171966464 (164.0MB)
OldSize = 22544384 (21.5MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 35651584 (34.0MB)
used = 4152920 (3.9605331420898438MB)
free = 31498664 (30.039466857910156MB)
11.64862688849954% used
From Space:
capacity = 3670016 (3.5MB)
used = 1703936 (1.625MB)
free = 1966080 (1.875MB)
46.42857142857143% used
To Space:
capacity = 3670016 (3.5MB)
used = 0 (0.0MB)
free = 3670016 (3.5MB)
0.0% used
PS Old Generation
capacity = 22544384 (21.5MB)
used = 10071824 (9.605239868164062MB)
free = 12472560 (11.894760131835938MB)
44.67553427053053% used
15456 interned Strings occupying 1376896 bytes.