龙空技术网

jmap使用记录

0哈哈逗0 82

前言:

现时兄弟们对“was查看jvm使用情况”可能比较重视,你们都需要知道一些“was查看jvm使用情况”的相关文章。那么小编同时在网络上搜集了一些对于“was查看jvm使用情况””的相关内容,希望各位老铁们能喜欢,小伙伴们快快来了解一下吧!

是什么?

The jmap command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server. If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the -J-d64 option, for example: jmap-J-d64 -heap pid.Note: This utility is unsupported and might not be available in future releases of the JDK. On Windows Systems where the dbgeng.dll file is not present, Debugging Tools For Windows must be installed to make these tools work. The PATH environment variable should contain the location of the jvm.dll file that is used by the target process or the location from which the crash dump file was produced, for example: set PATH=%JDK_HOME%\jre\bin\client;%PATH%.

查看堆内存使用情况

怎么用?

查看堆内存使用情况:jmap -heap PID

[tomcat_admin@zw204 bin]$ ./jmap -heap 93170Attaching to process ID 93170, please wait...Debugger attached successfully.Server compiler detected.JVM version is 25.112-b15using parallel threads in the new generation.using thread-local object allocation.Concurrent Mark-Sweep GCHeap Configuration:   MinHeapFreeRatio         = 40   MaxHeapFreeRatio         = 70   MaxHeapSize              = 8589934592 (8192.0MB)   NewSize                  = 3221225472 (3072.0MB)   MaxNewSize               = 3221225472 (3072.0MB)   OldSize                  = 5368709120 (5120.0MB)   NewRatio                 = 2   SurvivorRatio            = 8   MetaspaceSize            = 21807104 (20.796875MB)   CompressedClassSpaceSize = 1073741824 (1024.0MB)   MaxMetaspaceSize         = 17592186044415 MB   G1HeapRegionSize         = 0 (0.0MB)Heap Usage:New Generation (Eden + 1 Survivor Space):      #新生代-总   capacity = 2899116032 (2764.8125MB)   used     = 1532513360 (1461.5186309814453MB)   free     = 1366602672 (1303.2938690185547MB)   52.861401305927444% usedEden Space:                                                         #新生代-Eden   capacity = 2577006592 (2457.625MB)   used     = 1453096392 (1385.7807083129883MB)   free     = 1123910200 (1071.8442916870117MB)   56.386987775311056% usedFrom Space:                                                         #新生代-From   capacity = 322109440 (307.1875MB)   used     = 79416968 (75.73792266845703MB)   free     = 242692472 (231.44957733154297MB)   24.655274927676754% usedTo Space:                                                        #新生代-To   capacity = 322109440 (307.1875MB)   used     = 0 (0.0MB)   free     = 322109440 (307.1875MB)   0.0% usedconcurrent mark-sweep generation:             #老年代-CMS垃圾收集   capacity = 5368709120 (5120.0MB)   used     = 3749542560 (3575.8424377441406MB)   free     = 1619166560 (1544.1575622558594MB)   69.84067261219025% used71679 interned Strings occupying 7771640 bytes.

jmap -dump:format=b,file=heapdump.phrof pid

dump堆信息,然后使用 jhat、jvisualvm、mat 分析

标签: #was查看jvm使用情况