linux如何查看jvm实际内存情况
解决方法:
1.查看jvm的pid(下面的8499),执行:jps
[root@java-ceshi ~]# jps
8499 Bootstrap
11284 Jps
2.根据pid查询jvm情况:jmap -heap 8499
[root@java-ceshi ~]# jmap -heap 8499
Attaching to process ID 8499, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.80-b11
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 5368709120 (5120.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 1565523968 (1493.0MB)
used = 1069676016 (1020.1225433349609MB)
free = 495847952 (472.87745666503906MB)
68.32702902444481% used
From Space:
capacity = 109051904 (104.0MB)
used = 10881984 (10.37786865234375MB)
free = 98169920 (93.62213134765625MB)
9.978719858022837% used
To Space:
capacity = 112197632 (107.0MB)
used = 0 (0.0MB)
free = 112197632 (107.0MB)
0.0% used
PS Old Generation
capacity = 3579314176 (3413.5MB)
used = 1290749288 (1230.954444885254MB)
free = 2288564888 (2182.545555114746MB)
36.06135769401652% used
PS Perm Generation
capacity = 23068672 (22.0MB)
used = 22757208 (21.702964782714844MB)
free = 311464 (0.29703521728515625MB)
98.64983992143111% used