Java agent to send native memory metrics to StatsD using UDP, every 5 seconds.
mvn clean package
/opt/maven/apache-maven-3.9.2/bin/mvn release:prepare
/opt/maven/apache-maven-3.9.2/bin/mvn release:perform -Darguments="-Dmaven.deploy.skip=true"
wget https://docs.oracle.com/javase/tutorial/networking/sockets/examples/EchoServer.java
nc -l -u -p 8125
java -javaagent:target/native-memory-agent-1.0.jar=localhost:8125,foo=bar \
-XX:NativeMemoryTracking=summary \
EchoServer.java 8080
-XX:NativeMemoryTracking=summary
or-XX:NativeMemoryTracking=detail
is required to active native memory trackinglocalhost:8125
is the address for a UDP StatsD serverfoo=bar
are tags to be sent along with metrics, delimted by a comma