運行jmap獲取無法打開套接字文件我必須運行jmap才能獲取我的進程的堆轉(zhuǎn)儲。但jvm回來了:Unable to open socket file: target process not responding or HotSpot VM not loadedThe -F option can be used when the target process is not responding所以我使用了-F:./jmap -F -dump:format=b,file=heap.bin 10330Attaching to process ID 10331, please wait...Debugger attached successfully.Server compiler detected.JVM version is 24.51-b03Dumping heap to heap.bin ...使用-F 是可以進行堆轉(zhuǎn)儲嗎?我等了20分鐘還沒完呢。有什么想法嗎?
3 回答

aluckdog
TA貢獻(xiàn)1847條經(jīng)驗 獲得超7個贊
我剛剛發(fā)現(xiàn)jmap(當(dāng)使用它來生成堆轉(zhuǎn)儲時可能是jvisualvm)強制運行jmap的用戶必須是運行嘗試轉(zhuǎn)儲的進程的同一用戶。
在我的情況下,我希望堆轉(zhuǎn)儲的jvm由linux用戶“jboss”運行。所以在哪里sudo jmap -dump:file.bin <pid>
報告“無法打開套接字:”,我能夠使用以下方法獲取我的堆轉(zhuǎn)儲:
sudo -u jboss jmap -dump:file.bin <pid>
添加回答
舉報
0/150
提交
取消