Skip to content

premium-minds/native-memory-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Native Memory Agent

Java agent to send native memory metrics to StatsD using UDP, every 5 seconds.

Build

mvn clean package

Release

/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"

Usage

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 tracking
  • localhost:8125 is the address for a UDP StatsD server
  • foo=bar are tags to be sent along with metrics, delimted by a comma

Acknowledgements

About

Java agent to send native memory metrics to Stats

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages