Skip to content

inerplat/java-memory-dump-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-memory-dump-example

Run command with VM Options

java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/some/path -server -Xms2048m -Xmx2048m -javaagent:/some/path/apm-agent.jar -Delastic.apm.disable_bootstrap_checks=true -Delastic.apm.service_name=balcode -Delastic.apm.server_urls=https://YOUR_APM_HOST/ -Delastic.apm.environment=production -Delastic.apm.application_packages=com.example.balcode -jar ./build/libs/balcode-0.0.1.jar

Heap Dump

Visual VM

image

Memory Analyzer (MAT)

image

Elastic APM

image


Native Memory Dump

apt update && apt install gdb binutils -y

jcmd <pid> VM.native_memory detail
pmap -x <pid> | sort -k 3 -n -r | more
vim /proc/<pid>/smaps
gdb -pid <pid>
> dump memory /file/path start end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages