Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmap error "More than one non-option argument"

I'm trying to convert JVM core dump to HPROF format with following command jmap -dump:format=b,file=dump.hprof $(which java) core.dump.9

and getting the following error

Error: More than one non-option argument
Cannot connect to core dump or remote debug server. Use jhsdb jmap instead

What am I doing wrong and are there other tools to convert it? JDK is OpenJDK 11.0.4.

like image 491
synapse Avatar asked Sep 03 '25 03:09

synapse


1 Answers

Since JDK 9 jmap works only with a live JVM through the Dynamic Attach mechanism.

The 'forced' mode jmap -F was replaced with a separate utility jhsdb.

Use the following command to produce a heap dump from a core file:

jhsdb jmap --binaryheap --dumpfile dump.hprof --exe /usr/local/openjdk-11/bin/java --core core.dump.9
like image 152
apangin Avatar answered Sep 07 '25 17:09

apangin