Inspecting the Runtime with JMX

Java Management Extensions is a set of tools that support the management and monitoring of system objects, devices, networking, and applications. All of these tools are exposed through a service interface that’s controlled by scripts and even other applications. But the JDK comes packaged with a general-purpose console that provides a graphical interface for quickly inspecting a runtime through these extensions. This console is similar to VisualVM but provides a more fine-grained interface.

Before starting the JMX console, boot your application again. When doing so, provide the --manage option, which turns on JRuby’s own management extensions. Using Puma, the command is this:

 $ ​​ruby​​ ​​--manage​​ ​​-S ...

Get Deploying with JRuby 9k now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.