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

What does square bracket and letter prefix mean in the java jmap histogram?

What does square bracket and letter prefix mean in the jmap histogram? For example: [L and [C below? The doc https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr014.html#BABJIIHH only mention angle bracket which means…
gerrytan
  • 40,313
  • 9
  • 84
  • 99
0
votes
0 answers

Does JMAP lead to Full GC?

We have a WebLogic server with Java8 u172, I used "jmap -heap $pid" to check the heap memory usage, and then lead to Full GC every second. I waited for about 5 mins. It didn't stop. I can only try to kill -9 and restart the server. Does anyone know…
0
votes
0 answers

Does running JMAP heap every 2 minutes affects JVM service?

We are running jmap every 2 mins to collect the used heap Memory size information of a JVM application. JVM had heap size of 80GB. After reaching 98% the JVM suddenly went to unresponsive state. Garbage Collector should have cleared some memory…
0
votes
1 answer

error attaching to process when run jmap -heap pid

I deployed a microservice with docker container and want to check the jvm information. So I enter the container and find the pid. Then I run jmap -heap pid command, but I get the following error log: How to fix it?
Jianfeng
  • 5
  • 1
0
votes
1 answer

Understanding java memory usage

I am trying to solve a memory issue I am having with my tomcat servers and I have some questions about memory usage. When I check my process memory usage with top I see its using 1Gb physical memory, after creating a core dump using gdb, the core…
jacob
  • 1,397
  • 1
  • 26
  • 53
0
votes
1 answer

When to use jmap -J option?

I am going through jmap command documentation. -J options is documented like below. -J : to pass directly to the runtime system I am not getting, where exactly this scenario helps. For the experiment sake, I tried to increase the heap…
Hari Krishna
  • 3,658
  • 1
  • 36
  • 57
0
votes
0 answers

Why does memory go down after I take a heap dump?

I am running a web application with WildFly 9 and I've allocated X GB of memory. Over a period of time the memory gets accumulated and I run the jmap utility to collect the heap dump for analysing the memory utilization. When I do this, the memory…
Anjan Baradwaj
  • 1,219
  • 5
  • 27
  • 54
0
votes
1 answer

get jmap-like (i.e. heap usage) information programmatically?

I'd like to get the following information (particularly the current usage) programmatically so I can display it in a "health status" page in the application (and yes, I know it changes frequently). The code runs inside JBoss 5.1. $ jmap -heap…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85
0
votes
1 answer

How to jmap -permstat to an hprof image

I wonder how can I fetch stats of permgen using jmap -permstat to a hprof dump. I know it can be done against a PID. Regards,
devwebcl
  • 2,866
  • 3
  • 27
  • 46
0
votes
1 answer

How can I tell whether I am close to an OutOfMemoryError using jmap?

I am trying to understand which values I should examine in jmap outpout to detect whether JVM is close to throwing an OutOfMemoryError. e.g. Could in jmap -heap pid be a combination of values (which are close or have reached 100%)?
Marinos An
  • 9,481
  • 6
  • 63
  • 96
0
votes
2 answers

I found what kind of objects are causing a memory leak, now what?

Using the jmap -histo command on a running process, every 30 minutes or so, I found one kind of object that is obviously a memory leak (in a desktop app). The object responsible for the leak (I.e. the only kind of object whose number of instances…
NoozNooz42
  • 4,238
  • 6
  • 33
  • 53
0
votes
0 answers

Finalizer object in jmap histogram

What can be the reason I am seeing 2k objects of java.lang.ref.Finalizer in my jmap histogram 154: 2224 88960 java.lang.ref.Finalizer For Object.finalize() , Finalizer thread creates a new object everytime ?
samsudh
  • 73
  • 1
  • 8
0
votes
1 answer

MaxHeapSize vs capacity for subareas

Running jmap on a java process shows MaxHeapSize as 3GB, see below Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 3221225472 (3072.0MB) However, when summing up capacity for the respective areas as Eden Space: …
HenrikJson
  • 15
  • 3
0
votes
1 answer

Java running process : view byte code at runtime of an arbitary process

With the jmap command I can view variables and their state. Similarly is there an open source tool to save the byte code that is running in the JVM? Although we have the source code, there are times when its changed - with the help of AOP for…
tgkprog
  • 4,493
  • 4
  • 41
  • 70
0
votes
1 answer

Acquiring heap dump from a Java process to debug memory leaks

Followed the below process but I'm unable to analyze the dump generated. I tried to get heap dump from the Java process running on Linux box using "jmap -F -dump:format=b,file=/tmp/test.hprof " Ctrl+C after a span of 60 seconds Heap dump generated…
Sobhan
  • 21
  • 1
  • 10