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
4
votes
1 answer

JMAP dump size is 4.5 GB. Eclipse MAT is showing total heap of 415 MB, how do i analyze the remaining dump?

I am running a web application using Tomcat 6. We are using open JDK 6. Ours is AMD 64bit Ubuntu 11.04 server. Memory dump is taken by this command jmap -dump:format=b,file=/home/demon/Desktop/mymemorydump.hprof 2762 Memory dump is of 4.5 GB. When…
Rahul Agrawal
  • 99
  • 1
  • 4
3
votes
1 answer

How to extract JVM heap dump from core dump file?

I am trying to convert a Linux core dump of Java process to a heap dump file, suitable for analysing with Eclipse MAT. According to this blog post, adapted to the newer OpenJDK 12, I create a core dump and then run jhsdb jmap to convert the dump to…
Alex R.
  • 81
  • 1
  • 7
3
votes
3 answers

What does org.hibernate.hql.internal.ast.tree.Node means in jmap heap dump

I have a spring boot application that used spring data. I have native queries and query methods. Apparently i'm facing a memory issue from my application. I tried doing jmap -histo to determine the class that uses a lot of resource. On my first…
Clark
  • 143
  • 1
  • 9
3
votes
1 answer

What does "jmap -histo pid" print exactly

I am using the command "jmap -histo pid" and want to know what it is exactly telling me. The output is something like: num #instances #bytes class name ---------------------------------------------- 1: 2284437 262114728 …
Pwnstar
  • 2,333
  • 2
  • 29
  • 52
3
votes
1 answer

What is jmap's default heapdump format?

We are taking heapdumps and have a question: jmap -dump:file=heapdump.hprof,format=b If you specify format=a it will be usage message in ascii If you specify format=b it will be binary OK great, but what if you don't specify a format at all? jmap…
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
3
votes
1 answer

Can I read a jmap dump with jprofiler?

When I create a dump using jmap jmap -J-d64 -heap:format=b ${pid} Can I open the resulting heap.bin somehow in JProfiler?
monk
  • 640
  • 1
  • 5
  • 17
3
votes
0 answers

java - jmap crashes with "can not get class data for heapdump in java 8

jmap -F -dump:file=heap.dump 13976 following are the error logs Attaching to process ID 13976, please wait... Debugger attached successfully. Server compiler detected. JVM version is 25.25-b02 Dumping heap to heap.dump ... Exception in thread…
3
votes
1 answer

Jmap for play framework on heroku

I'd like to take heap dumps of a play framework (v2.4.x) deployed on heroku. I read this heroku guide which instructs to prefix the java command with with_jmap. However play has its own start script that executes java and the with_jmap option is…
LiorH
  • 18,524
  • 17
  • 70
  • 98
3
votes
1 answer

Mat can't open the dump file

My jmap command is sudo -u flume /usr/java/jdk1.8.0_60/bin/jmap -F -dump:format=b,file=heap.hprof pid, But eclips mat can't open the dump file,and throw an exception. java.lang.NullPointerException at…
Dev Zhou
  • 865
  • 2
  • 14
  • 21
3
votes
1 answer

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even…
Haasip Satang
  • 457
  • 3
  • 17
3
votes
1 answer

How come my HashMap have a duplicate key?

We have a class named Subscriber, that extends "HashMap". We have many instances of this class in a list, and each instance has a set of entries set to the map, one of these are "status". Our program is updating the "status" value by calling a…
goddva
  • 231
  • 1
  • 4
3
votes
1 answer

Jmap - Error connecting to remote debug server

My requirement is to create a dump file of heap memory of a remote server using Jmap. I did this way. jmap -dump:file=remoteDump.txt,format=b 3104 This worked fine as 3104 is the pid of a process from my local machine. How do I do the same with…
Aryan Venkat
  • 679
  • 1
  • 10
  • 34
3
votes
2 answers

Best Tool to collect Java process statistics and Explanation of JMAP

I am looking at collecting more detailed java statistics (in plain text format) i.e. statistics that the jstat command emits - like garbage collection data etc. Can anyone please suggest me the best tool to collect the java process statistics like…
Space
  • 7,049
  • 6
  • 49
  • 68
3
votes
2 answers

How to see program variable name and values in heap dump?

I am using JMAP to create a heap dump of JVM while executing a Java program. Then using JHAT I am opening the dump details in the browser. Now, I can see many details of the memory dump, but I don't know how to simply look at the program variable…
kajarigd
  • 1,299
  • 3
  • 28
  • 46
3
votes
1 answer

jmap [option] - what does that mean and how to use it?

I'm trying to use jmap utility. It's too hard to specify pid each time, so I search for easier option. In jmap's help I found an option jmap [option] < executable < core > But this absolutely not self-explanatory. What stands for executable/core?…
Boris
  • 1,054
  • 1
  • 13
  • 23