Jmap error "More than one non-option argument"

synapse :

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.

apangin :

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=133932&siteId=1