Giter Club home page Giter Club logo

jmx4r's Introduction

jmx4r is a JMX library for JRuby.

It can be used to write simple Ruby scripts running on JRuby to manage remote Java applications (e.g. JBoss, Tomcat) using JMX.

jmx4r helps to manage Java applications using JMX in a simple and powerful way:

  • no need to depend on the Java interfaces of the MBean in your management code. This means less deployment issues

  • Thanks to Ruby metaprogramming toolset, you can treat your MBeans as simple objects and jmx4r hides all the complexity to map them to the javax.management API for you

  • you can manage your own JVM (e.g. if you’re running a Rails on JRuby application) or a remote JVM in the same way

Installation

jruby -S gem install jmx4r

Usage

# To trigger a garbage collection on a Java application:

require 'rubygems'
require 'jmx4r'

JMX::MBean.establish_connection :host => "localhost", :port => 3000

memory = JMX::MBean.find_by_name "java.lang:type=Memory"
# display verbose GC logs
memory.verbose = true
# trigger a Garbage Collection
memory.gc

# For local processes not publishing jmxrmi ports, instead:

# connect to the local JConsole process
JMX::MBean.establish_connection :command => /jconsole/i

Help

Source Code

git clone git://github.com/jmesnil/jmx4r.git

jmx4r's People

Contributors

jmesnil avatar claymation avatar mnadel avatar

Stargazers

Mike Pountney avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.