Questions tagged [jcmd]

jcmd utility is used to send diagnostic command requests to a running Java Virtual Machine (JVM). Like when you need stack trace, heap dump, vm arguments, system properties etc.

Below are official links for more details on jcmd

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jcmd.html https://docs.oracle.com/javase/9/tools/jcmd.htm

48 questions
1
vote
0 answers

How to read Java 8 metaspace dump

We have been suffering metaspace OOM recently for our application due to groovy stuff, however, I managed to cache compiled script to stop it happening right now. Previously, the process crashed at least once a day. It has been running fine for at…
machinarium
  • 631
  • 6
  • 17
1
vote
0 answers

JVM hang, unable to print stack information

One of my services is deadlocked, I can't print the stack information. Is there any way to troubleshoot the problem?
dai
  • 1,025
  • 2
  • 13
  • 33
1
vote
1 answer

jcmd - Handle custom commands in running JVM

The jcmd utility offers multiple diagnostic commands: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html Is it possible to have custom commands and handle them in the running JVM? Something like: jcmd $PID myCmd
Andrejs
  • 26,885
  • 12
  • 107
  • 96
0
votes
1 answer

jstack and jcmd not working inside AWS ECS container

I am trying to run jstack and jmd inside an AWS ECS container (EC2 based, not fargate) for some debugging. The container is running a Springboot based application. I have verified that jcmd and jstack are present, but I am getting following…
Sumit Jindal
  • 363
  • 1
  • 7
  • 17
0
votes
0 answers

Java process memory usage: jcmd vs Windows Resource Monitor

I'm at a loss regarding the reported memory usage of my Java application (deployed on JBoss EAP) when under load. The java.exe process memory as shown by Windows Resource Monitor is much higher than what is reported by jcmd VM.native_memory. How can…
nodots
  • 1,450
  • 11
  • 19
0
votes
0 answers

Wrong line number returned when grabbing stack frame with jcmd

I grabbed the stack frames of all threads using jcmd pid Thread.print on the production server to troubleshoot the problem, but found that one of the methods had a clearly incorrect line number, so I grabbed a heap dump using the internal diagnostic…
Poison
  • 389
  • 2
  • 14
0
votes
1 answer

How to get a running springboot applcation's active profiles from the command line?

How do you get the active profile from a running spring boot application from the command-line? I know about jcmd but I could not find anything that references the springboot properties. Is there another way or am I missing something with jcmd?
WesAtWork
  • 65
  • 7
0
votes
0 answers

JCMD command is not listing the java process

I have a java process named app created under abc user. Now, when I am executing the jcmd command as abc user to list the java processes, it is not listing the app. At the same time, ps aux | grep java command is listing it. Only jcmd command has…
Eli Johnes
  • 301
  • 3
  • 13
0
votes
1 answer

Parse heap dump information from linux command [jcmd]

I am not so good with Linux commands & Can someone please tell me what would be an efficient way to gather total(33521664K) & used(22917322K) values from this command result > jcmd 27047 GC.heap_info 27047: garbage-first heap total 33521664K,…
rvk_user
  • 1
  • 2
0
votes
1 answer

how is memory malloc'd in JNI layer reported in jcmd VM.native_memory

In a Java program running under JDK 8 , there is a JNI layer. This JNI layer is allocating memory using malloc. AFAIK this malloc'd memory in the JNI is outside the scope of the Java heap usage. Now if i do a jcmd VM.native_memory under which…
John
  • 33
  • 1
  • 7
0
votes
2 answers

What is JFR parameter filename meaning? File ends up being empty after exit

I have situation where I start JDK18 jvm from c++ code to produce vst plugin goal being to implement audio signal algorithms in java side with added value of full java GUI api. My framework works very smoothly apart from the repeatable state where…
Tonecops
  • 127
  • 9
0
votes
1 answer

Java Flight Recorder dump shows timeline starting from 1/1/1970

When starting the JFR using jcmd command and creating a recording dump, the resulting .jfr file when opened in mission control shows the timeline starting from 1/1/1970. The issue occurs only for the first recording dump after starting the…
xagaffar
  • 683
  • 8
  • 16
0
votes
1 answer

NMT Class committed vs Jstat Compressed Class Space

I'm investigating the OutOfMemoryError: Compressed Class Space issue. I think, that I found my root cause and solution for it (JAXBContext.newInstance() called by Hibernate Validator method: buildValidatorFactory after every submitted action by…
0
votes
0 answers

How to use JCMD to access NMT data

I am trying to access NMT using jcmd trough this below code: jcmd 4348 VM.native_memory [summary] [scale=10 GB] But getting this below error: com.sun.tools.attach.AttachNotSupportedException: Unable to attach to 32-bit pro cess running under WOW64 …
0
votes
0 answers

Handling MetaSpace leak issue (Out of Memory)

I'm working on an application for a while. Recently, At my workplace some redesigns were made on the application (Java Enterprise web application implemented using Jersey REST and Spring framework). We are noticing that the application started…
daemon54
  • 1,057
  • 3
  • 16
  • 36