jattach icon indicating copy to clipboard operation
jattach copied to clipboard

Support for jmap -live

Open colathurv opened this issue 1 year ago • 1 comments

I would like to know if jattach supports the equivalent of the jmap -dump:live as mentioned in Oracle documentation. The intent here is to only dump live objects, in order to optimize the size of the dump file. Since jattach only has the dumpheap option, it is not clear, if the live option is supported.

Appreciate your help.

colathurv avatar Jun 19 '24 20:06 colathurv

Yes, just add -live option at the end:

jattach PID dumpheap outputfile.hprof -live

apangin avatar Jun 19 '24 21:06 apangin