Skip to content

Instantly share code, notes, and snippets.

@prasanthj
prasanthj / native-mem-tracking.md
Last active Sep 13, 2021
Native memory tracking in JVM
View native-mem-tracking.md

Enable native memory tracking in JVM by specifying the following flag

-XX:NativeMemoryTracking=detail

Know the <PID> of the java process

jps

To print ps based RSS

ps -p <PID> -o pcpu,rss,size,vsize

To print native memory tracking summary