Monitoring java native memory
问题 We are monitoring jvm metrics like heap, metaspace, threads and gc count and we are able to push these metrics to monitorng server like prometheus. Similarly we wanted to track Java native memory metrics(output of jcmd VM.sumary). My question is, is it possible to get these metrics by calling any jvm runtime classes? 回答1: Yes, it is possible to get NativeMemoryTracking summary directly from a Java application: import javax.management.JMException; import javax.management.ObjectName; import