Class JvmNativeMemoryMetrics

Object
JvmNativeMemoryMetrics

public class JvmNativeMemoryMetrics extends Object
JVM native memory. JVM native memory tracking is disabled by default. You need to enable it by starting your JVM with this flag:
-XX:NativeMemoryTracking=summary

When native memory tracking is disabled the metrics are not registered either.

The JvmNativeMemoryMetrics are registered as part of the JvmMetrics like this:


 JvmMetrics.builder().register();
 
However, if you want only the JvmNativeMemoryMetrics you can also register them directly:

 JvmNativeMemoryMetrics.builder().register();
 
Example metrics being exported:
 # HELP jvm_native_memory_committed_bytes Committed bytes of a given JVM. Committed memory represents the amount of memory the JVM is using right now.
 # TYPE jvm_native_memory_committed_bytes gauge
 jvm_native_memory_committed_bytes{pool="Arena Chunk"} 58480.0
 jvm_native_memory_committed_bytes{pool="Arguments"} 25119.0
 jvm_native_memory_committed_bytes{pool="Class"} 1.00609438E8
 jvm_native_memory_committed_bytes{pool="Code"} 2.7980888E7
 jvm_native_memory_committed_bytes{pool="Compiler"} 529922.0
 jvm_native_memory_committed_bytes{pool="GC"} 515466.0
 jvm_native_memory_committed_bytes{pool="Internal"} 673194.0
 jvm_native_memory_committed_bytes{pool="Java Heap"} 4.0923136E7
 jvm_native_memory_committed_bytes{pool="Logging"} 4596.0
 jvm_native_memory_committed_bytes{pool="Module"} 96408.0
 jvm_native_memory_committed_bytes{pool="Native Memory Tracking"} 3929432.0
 jvm_native_memory_committed_bytes{pool="Other"} 667656.0
 jvm_native_memory_committed_bytes{pool="Safepoint"} 8192.0
 jvm_native_memory_committed_bytes{pool="Symbol"} 2.4609808E7
 jvm_native_memory_committed_bytes{pool="Synchronizer"} 272520.0
 jvm_native_memory_committed_bytes{pool="Thread"} 3546896.0
 jvm_native_memory_committed_bytes{pool="Total"} 2.0448392E8
 jvm_native_memory_committed_bytes{pool="Tracing"} 1.0
 jvm_native_memory_committed_bytes{pool="Unknown"} 32768.0
 # HELP jvm_native_memory_reserved_bytes Reserved bytes of a given JVM. Reserved memory represents the total amount of memory the JVM can potentially use.
 # TYPE jvm_native_memory_reserved_bytes gauge
 jvm_native_memory_reserved_bytes{pool="Arena Chunk"} 25736.0
 jvm_native_memory_reserved_bytes{pool="Arguments"} 25119.0
 jvm_native_memory_reserved_bytes{pool="Class"} 1.162665374E9
 jvm_native_memory_reserved_bytes{pool="Code"} 2.55386712E8
 jvm_native_memory_reserved_bytes{pool="Compiler"} 529922.0
 jvm_native_memory_reserved_bytes{pool="GC"} 1695114.0
 jvm_native_memory_reserved_bytes{pool="Internal"} 673191.0
 jvm_native_memory_reserved_bytes{pool="Java Heap"} 4.02653184E8
 jvm_native_memory_reserved_bytes{pool="Logging"} 4596.0
 jvm_native_memory_reserved_bytes{pool="Module"} 96408.0
 jvm_native_memory_reserved_bytes{pool="Native Memory Tracking"} 3929400.0
 jvm_native_memory_reserved_bytes{pool="Other"} 667656.0
 jvm_native_memory_reserved_bytes{pool="Safepoint"} 8192.0
 jvm_native_memory_reserved_bytes{pool="Symbol"} 2.4609808E7
 jvm_native_memory_reserved_bytes{pool="Synchronizer"} 272520.0
 jvm_native_memory_reserved_bytes{pool="Thread"} 3.383272E7
 jvm_native_memory_reserved_bytes{pool="Total"} 1.887108421E9
 jvm_native_memory_reserved_bytes{pool="Tracing"} 1.0
 jvm_native_memory_reserved_bytes{pool="Unknown"} 32768.0