为了对我的进程进行堆转储,我不得不运行 jmap
。但是 jvm
返回:
Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
所以我使用了-F
参数:
./jmap -F -dump:format=b,file=heap.bin 10330
Attaching to process ID 10331, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.51-b03
Dumping heap to heap.bin ...
- 使用
-F
拍取堆转储是可以的吗? - 我已经等了20分钟还没有完成。有什么想法原因吗?
sudo chmod 777 /proc/54321/cwd/
sudo chmod 777 /proc/54321/root/tmp/
sudo -u tomcat jcmd 54321 GC.heap_dump /tc/logs/heap_dump.hprof
- Eelco