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
2
votes
0 answers

Unable to convert coredump to hprof

I have a core.31690 file which I want to convert to hprof. I tried: jmap -dump:format=b,file=mydump.hprof /usr/bin/java core.31690 but I got the following: Attaching to core core.31690 from executable /usr/bin/java, please wait... Exception in…
noMAD
  • 7,744
  • 19
  • 56
  • 94
1
vote
0 answers

Java object memory footprint - what to believe ? jhat ? ClassLayout?

I have a simple java class "Tile" that declares 4 fields : two integers two objects (pointers) I'm trying to know what is the exact memory footprint of an instance of this class. Using the org.openjdk.jol.info.ClassLayout.parseInstance(obj)…
sr-01-01
  • 87
  • 1
  • 3
1
vote
0 answers

Install JMAP inside a docker container

How can I install jmap on my docker container to get its heap dump once its deployed to AWS ECS as a container.I am using distroless as my base java image.Below is my dockerFile.I have managed to install all other utilities in my container other…
Amol Kshirsagar
  • 253
  • 3
  • 16
1
vote
1 answer

Java Heap committed memory is bigger than -Xmx

I am trying to hunt the memory leak in Java Spring Boot app inside docker container. Heap size of the app is limited like this: java -XX:NativeMemoryTracking=summary -jar /app-0.1.jar -Xms256m -Xmx512m Native memory diff looks like this: ./jcmd 7…
Ivan Jovović
  • 5,238
  • 3
  • 29
  • 57
1
vote
0 answers

Create JVM heap dump of tomcat service running on Window

While trying to create a heap dump from a Tomcat Service running as windows service, get "Access is denied" error. I started the command prompt as "Run as Administrator" Erorr while using jmap and jcmd How do I get rid of "Access is denied" or is…
Raja
  • 11
  • 1
1
vote
1 answer

Taking a heap dump leads to a crash

I have a java process running inside a container with Kubernetes orchestration. I was observing a high memory footprint in docker stats. I have -Xmx=40Gb and docker stats were reporting 34.5 GiB memory. To get a better understanding about heap…
wypul
  • 807
  • 6
  • 9
1
vote
1 answer

`make install` Fails Inside Docker

I'm trying to build a docker image for a JMAP Proxy named jmap-perl. The documentation states that it targets Debian Jessie by default, so I have created the following Dockerfile: FROM debian:jessie # Port to expose. EXPOSE 80 # Add all files in…
Floating Sunfish
  • 4,920
  • 5
  • 29
  • 48
1
vote
3 answers

What is the Java class for a Tomcat session?

I made a JVM heap dump of my tomcat server with jmap, and I'd like to figure out what is the size of all the sessions in memory. As such I would like to know what type of object I should be looking for to estimate the sessions size. Thank you
Matthieu Napoli
  • 48,448
  • 45
  • 173
  • 261
1
vote
0 answers

jmap dump failed with file is too large

"文件过大" in chinese means the file is too large jdk: openjdk_1.8.0_121 os: rhel 6.5 What is the problem?
winflex
  • 113
  • 7
1
vote
1 answer

why the result of jmap -histo is different from jmap -dump

recently i met a gc problem ,i used jmap to dump out the heap. But unfortunately it did not work properly; i run jmap -histo 3916|more before dump ,the result is num #instances #bytes class…
1
vote
0 answers

JMAP Docker doesn't start

I am trying to run a JMAP-perl docker, but when I docker compose it, I get this error : Attaching to jmap jmap | Starting nginx: nginx. jmap | Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /home/jmap/jmap-perl /etc/perl…
asa
  • 531
  • 1
  • 5
  • 20
1
vote
1 answer

what the classname like [C [B [[C is,when i exec "jmap -histo:live 4984"?

And is always has most instances, just like this enter codnum #instances #bytes class name ---------------------------------------------- 1: 82828 10033408 [C 2: 39920 6012864 [B 3: …
Caion
  • 21
  • 4
1
vote
1 answer

Is it safe (or a good idea) to run "jmap -histo:live" on a scheduled basis to trigger garbage collection?

Is it safe (or a good idea) to run "jmap -histo:live" on a scheduled basis (e.g. every 10minutes) to trigger garbage collection? We want to reduce the number of alarms we are getting from AWS (Amazon Web Services), which is triggered when memory…
geffchang
  • 3,279
  • 2
  • 32
  • 58
1
vote
0 answers

field "_bmStartWord" not found in type CMSBitMap

when run jmap -histo -F , throws exception java.lang.RuntimeException:field "_bmStartWord" not found in type CMSBitMap.
Lahahana
  • 11
  • 2
1
vote
1 answer

Is it possible to find the creation time of a thread using thread dump?

I use jmap -dump:format=b,file= command to generate thread dump of a JVM instance. I just want to know if it's possible to find the time of creation of a thread running in the JVM instance, using the thread dump generated.
UnahD
  • 867
  • 2
  • 10
  • 25