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
6
votes
3 answers

jhat throwing unrecognized magic number

I am trying to analyse a heap dump taken from a java process that ran into memory issues. The dump was taken using jmap. I am using jhat on the dump file - I am getting java.io.IOException: Unrecognized magic number: 169897589 at…
Bhaskar
  • 7,443
  • 5
  • 39
  • 51
6
votes
3 answers

Java: New Generation Used 100%, Eden Space Used 100%, From Space Used 100%

jmap -heap gives me output that says: New Generation Used 100%, Eden Space Used 100%, From Space Used 100%, To Space Used: 0%, Perm Generation Used: 38% Is this 100% of New, Eden, From space - a problem? My JAVA OPTS are: -Xms10240m -Xmx14336m…
Jasper
  • 8,440
  • 31
  • 92
  • 133
5
votes
1 answer

Why would I see only "dead" classloaders from jmap -permstat (except the bootstrap)?

We've been pushing the permgen memory space in our app higher and higher and I'm trying to find out if we have a leak of some sort eating into the permgen area. We don't do hot undeploy/redeploy actions, but we have plenty of proxies, both dynamic…
Scott
  • 888
  • 7
  • 21
5
votes
1 answer

Jmap heap dump, does it include young generation?

Quick question Does the jmap heap dump include only the old generation, or also the young generation ? Long explanation I have 2 heap dump (jmap -heap:format=b 9999) : one of my server with no load (no HTTP request) one while working 50% CPU, a…
Matthieu Napoli
  • 48,448
  • 45
  • 173
  • 261
5
votes
1 answer

jmap tool works only as root and output columns are not clear

Using jmap on Ubuntu Mate 18.04-64bits with Oracle JDK 10.0.1-64bits, the tool works only when running both the target and the tool as root, but using the same normal user for running both gives the following error: Exception in thread "main"…
Naruto Biju Mode
  • 2,011
  • 3
  • 15
  • 28
5
votes
0 answers

jstack unable to print java thread stacks from Windows crash dump

I'm trying to extract a java heap dump from a native dump taken by WER when it crashed: jstack -m -l "c:\Program Files\Java\jre6\bin\java.exe" WER.tmp.hdmp but I get the following exception: Attaching to core c:\Users\xxx\Desktop\WER.tmp.hdmp from…
Sparkles
  • 255
  • 3
  • 8
5
votes
1 answer

Statistics of objects in old generation?

Is there any tool to view object statistics on the different generations of a JVM Heap? I'm looking into a potential memory leak and need some data over the different generations. The use case I have is to take a snapshot over object in old…
Cowboy
  • 515
  • 1
  • 6
  • 13
4
votes
1 answer

Dumping Java Heap File on OutOfMemoryError using Jmap

I've been trying to dump the heap file when an OutOfMemoryError occurs on a given Java process using Jmap. I have been able to dump the heap file but I want to add the HeapDumpOnOutOfMemoryError flag to Jmap but I think I'm doing something wrong. Am…
Eduardo Morales
  • 764
  • 7
  • 29
4
votes
1 answer

is JVM stopped while executing jmap -heap option?

usage) Jmap -heap [PID] Hello I have jmap question I want to view only size (-heap option) Heap Dump No... If I run [jmap -heap PID] running jvm process is STOP THE WORLD?
ChulK
  • 49
  • 6
4
votes
1 answer

jmap - Does histo & heap operation bring overhead to jvm?

As the title states, how much overhead does jmap -histo and jmap -heap bring to a jvm respectively? If a memory sensitive Java process is at the edge of OutOfMemory (e.g around 96% of heap is full, and can't be cleared by full gc), is it possible…
Eric
  • 22,183
  • 20
  • 145
  • 196
4
votes
1 answer

How to take a heap dump in windows with minimum downtime?

I want to figure out why JVM heap usage on Elasticsearch node is staying consistently above 80%. In order to do this, I take a heap dump by running jmap.exe -heap:format=b 5348 (5348 is the Process ID). Then I can analyze the dump with…
svetli-n
  • 53
  • 1
  • 4
4
votes
3 answers

Open source JMAP compliant servers?

I'm exploring the possibility of building a centrally hosted email client, embedded within my site. Users would be provisioned a new email address from me, they are not using their existing email. Essentially, I'm looking for the feature set of an…
4
votes
1 answer

memory analysis from eclipse ide does not list any local process id when acquire heap dump dialog is clicked

Using memory analyzer from eclipse ide (kepler), I'm trying to acquire heap dump from a locally running VM while an program is running, however acquire heap dump dialog does not list any pid to select. I try to configure hdrof jmap dump…
burcak
  • 1,009
  • 10
  • 34
4
votes
1 answer

jmap appears slower under Java 7, slows down JVM

We've been using jmap for ~2 years to measure heap size on a large, multi-server app, running under Java 6. We take a measurement every minute. Each measurement took (elapsed time) less than 1 second. We're now testing the same app under Java 7. …
Charles Roth
  • 798
  • 5
  • 8
4
votes
0 answers

unable to convert java core dump to hprof with jmap

When trying to convert java core dump with jmap to hprof, i get this exection: Attaching to core core.26045 from executable /usr/java/jdk1.6.0_21/bin/java, please wait... Debugger attached successfully. Server compiler detected. JVM version is…
theSTIG
  • 159
  • 1
  • 6
1 2
3
10 11