This is a JRuby library which gives the user easy access to the JMX interface provided by various Java App Servers.
It's primary use case is to monitor services very easily (for memory, CPU, threads, etc)
The inspiration came from Jeff Mesnil's blog post: jmesnil.net/weblog/2007/03/23/jmx-scripts-using-jruby/
As of now, you can only query the heap status from JMX. More features will be added (Patches and pull requests always welcome)
The lib can be used like so:
require 'lib/rubyjmx' RubyJMX::Session.new('localhost', '3000', :username => 'username', :password => 'password', :connect => true) do |session| # Prints out in bytes, the number of used bytes in the JVM heap puts session.heap_memory_snapshot.used end