最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kubernetes - jmap in kubectl debug container returns immediately; heap dump file is missing - Stack Overflow

programmeradmin5浏览0评论

I'm trying to get a Java heap dump out of a GKE container.

First I connect to the container:

kubectl debug -it my-pod --image adoptopenjdk/openjdk11:latest --target=my-container -- bash

Then I run:

jmap -dump:live,format=b,file=heap_dump.hprof <pid of my java program>

The program returns instantly, having outputted:

Heap dump file created

However there is no file to be found.

I'm trying to get a Java heap dump out of a GKE container.

First I connect to the container:

kubectl debug -it my-pod --image adoptopenjdk/openjdk11:latest --target=my-container -- bash

Then I run:

jmap -dump:live,format=b,file=heap_dump.hprof <pid of my java program>

The program returns instantly, having outputted:

Heap dump file created

However there is no file to be found.

Share Improve this question asked 1 hour ago Carl Patenaude PoulinCarl Patenaude Poulin 6,5895 gold badges29 silver badges55 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

jmap creates the heap dump file in the file system of the original container, found at /proc/1/root.

发布评论

评论列表(0)

  1. 暂无评论