Last active
February 1, 2019 20:29
-
-
Save jebeaudet/25bddb4e36653cbba3f0c83b34eff414 to your computer and use it in GitHub Desktop.
Dump java docker heap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install openjdk in the container | |
docker exec -it --user=root container_name sh | |
apk add openjdk8 | |
docker exec -it <container_name> jmap -dump:format=b,file=/tmp/cheap.bin 1 | |
# Also works | |
docker exec <container_name> jcmd 1 GC.heap_dump /tmp/docker.hprof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment