4

I've been trying to dump the heap file when an OutOfMemoryError occurs on a given Java process using Jmap.

I have been able to dump the heap file but I want to add the HeapDumpOnOutOfMemoryError flag to Jmap but I think I'm doing something wrong. Am I doing something wrong? I've tried:

jmap -J-XX:+HeapDumpOnOutOfMemoryError -dump:live,file=/home/eduardo2/dumpfile.hprof 18763

When I run the above it just says the following -- but it doesn't wait for the OutOfMemoryError:

>> Dumping heap to /home/eduardo2/dump21file.hprof ...
>> Heap dump file created

1 Answer 1

5

You are mixing up two different things:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.