Sample Header Ad - 728x90

Heap dump using jmap for memory leak purpose

0 votes
0 answers
47 views
so i am trying to check memory leak currently so i did some thread dump and heap dump for it i am using jdk11 command which is jstack & jmap the jstack command runs well, i can see the file in SFTP using Termius when i run the jmap command, this actually run as well saying
Dumping heap to /tmp/heap_dump_activemq.hprof ...
Heap dump file created [102526562 bytes in 0.318 secs]
when i checked the file in SFTP however it doesn't appear. when i tried to rerun the jmap command it said the file exists when i tried to move the file using mv it also said that the file or directory doesn't exist there is also sometimes this error message block when running the jmap
at jdk.attach/sun.tools.attach.VirtualMachineImpl.(VirtualMachineImpl.java:100)
at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
at jdk.jcmd/sun.tools.jmap.JMap.executeCommandForPid(JMap.java:128)
at jdk.jcmd/sun.tools.jmap.JMap.dump(JMap.java:208)
at jdk.jcmd/sun.tools.jmap.JMap.main(JMap.java:114)
Asked by Devs (1 rep)
Mar 20, 2025, 09:45 AM