Questions tagged [jmap]

A Hotspot JVM command-line utility that prints memory-related statistics for a running JVM or core file.

jmap is a command-line utility that serves as a tool for troubleshooting various memory-related issues in a Java Virtual Machine (JVM). jmap is distributed as a part of Oracle's Hotspot JVM, and so it can be used only for the Hotspot JVM.

jmap usually prints memory-related statistics for a running JVM or core file. Typical uses of jmap are :

  • jmap -histo <jvm-pid> - which prints class histogram of the instances present in the heap
  • jmap -heap <jvm-pid> - which prints a heap summary

A full list of command line options is available here.

163 questions
1
vote
1 answer

AWS EC2 jmap heap dump

I have an AWS EC2 instance running Tomcat facing some OutOfMemory issues. I have: run sudo yum --enablerepo='*-debug*' install java-1.8.0-openjdk-devel run sudo -u tomcat jmap -F -dump:format=b,file=/foo/heapdumps/heapdump.bin The jmap fails…
Earthling
  • 283
  • 5
  • 17
1
vote
0 answers

jmap : unable to collect the heap dump

I'm trying to collect the heap dump on AWS ec2-instance. The file size of the heap dump was more than 6G. So my AWS linux Filesystem looks like this. Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.8G 1.7G 6.0G 22% / devtmpfs …
krish
  • 349
  • 3
  • 17
1
vote
0 answers

Could not find symbol "gHotSpotVMTypeEntryTypeNameOffset"

I execute for following: jmap -heap 23054 But I get an error. The output is: Attaching to process ID 23054, please wait... sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypeEntryTypeNameOffset" in any of the…
1
vote
1 answer

How to check live memory consumption of wildfly in ubuntu

I am using wildfly (JBOSS 9) as server for my java web application. But after some time i.e. almost 8-9 hours of usage the application becomes dead slow. How can i check the live memory consumption of wildfly in terminal or on UI. I am using Ubuntu…
swayamraina
  • 2,958
  • 26
  • 28
1
vote
0 answers

Jmap does not report full memory usage of the JVM

I am trying to diagnose an OOM exception in my process. I am using Jmap and find that it does not report full memory usage of the JVM. This is the output of jmap -histo:live (truncated): num #instances #bytes class…
morpheus
  • 18,676
  • 24
  • 96
  • 159
1
vote
3 answers

Why does the ratio between each survivor space and eden does not match SurvivorRatio?

The SurvivorRatio parameter controls the size of the two survivor spaces. For example, -XX:SurvivorRatio=6 sets the ratio between each survivor space and eden to be 1:6, each survivor space will be one eighth of the young generation. Why does the…
Yanhui Zhou
  • 872
  • 6
  • 20
1
vote
1 answer

Memory leaks java

my java application, always needs more and more memory (starting at ~40mb, after 2 days about 140mb) I used ./jmap -histo 17364 | head -10 num #instances #bytes class name ---------------------------------------------- 1: …
user2071938
  • 2,055
  • 6
  • 28
  • 60
1
vote
1 answer

Find 2 equals objects in different heap dump using visualvm

I have some memory leak in my java application. I've made 2 heap dumps using jmap. And I see that there is 200 of objects which grow up and I suppouse that it's the reason of memory leak. But I need to verify that it's exactly the same objects. I…
alex
  • 942
  • 1
  • 10
  • 26
1
vote
0 answers

Two instances of enum array in jmap

When I was analyzing the output of jmap from our application, I came across something strange with enum classes. For each enum, there were two instances of the enum array created. What does this array contain? Why are there two instances of the enum…
prasanth
  • 3,502
  • 4
  • 28
  • 42
1
vote
1 answer

getting permgen space fom jmap

I am using java version "1.6.0_31" (I know old version). I am using jmap -heap to view my process's permgen usage. However, when I look at the output, I see these lines, which seem to tell me that my current permspace usage is 12MB Heap…
adamM
  • 1,116
  • 10
  • 29
1
vote
1 answer

Heap dump with jmap throws NullPointerException

I'm trying to take a heap dump using jmap but I keep getting a NPE. I'm using Oracle's Java7 jdk (details below). $sudo jmap -F -dump:format=b,file=heap.bin 21966 Attaching to process ID 21966, please wait... Debugger attached successfully. Server…
Rajiv
  • 305
  • 6
  • 16
1
vote
1 answer

How I can put an image like an arrow between two points in JMapViewer

How I can put an image that goes from point p1 to point p2? Anyone can suggest a way to me? Edit: I follow this example, Draw Line between two Geo Points in JMapViewer, to draw a path between two geoPoints. But when I try to delete a MapPolygon,…
doflamingo
  • 77
  • 1
  • 1
  • 9
1
vote
1 answer

how to convert core file to hyprof file

Recently one of our jvm got crashed.There is a core file that is generated.I want to have a look at that file and find out the reason behiond the crash. But I am not able to analze the core.I used jmap to analyze it. And wrote the command-: jmap…
Param1414086
  • 183
  • 4
  • 17
1
vote
0 answers

Java Jmap dump hanging and not creating file

I'm trying to get a dump on a process using jmap. The following jmap command... c:\log>"C:\Program Files\Java\jdk1.7.0_65\bin\jmap" -dump:file=heap2.map 5264 returns Dumping heap to C:\log\heap2.map ... Where it sits for eternity, and does not…
user1870954
  • 207
  • 3
  • 14
1
vote
1 answer

sun.tools.jmap.JMap.main not recognizable

I have the line 'sun.tools.jmap.JMap.main(args);' in my code. Eclipse is giving error saying the class is not identified. So, I tried to download sun.tools jar. But I could not find this jar anywhere! I am not sure what to include to remove this…
kajarigd
  • 1,299
  • 3
  • 28
  • 46