Cacao supports JMX Remote Monitoring and Management

Since a few days Cacao successfully starts OpenJDKs JMX Monitoring and Management Agent if requested to do so. This allows you to remotely connect to Cacao with any JMX-compliant monitoring tool. One of the main responsibilities of this agent is to act as a server for MBeans (managed beans). The JRE provides some basic MBeans which allow out-of-the-box monitoring and management of VM internals. But applications can easily extend the functionality by providing custom MBeans. If you want to learn more about this topic, you should visit OpenJDKs JMX group.

One such JMX-compliant monitoring tool is JConsole which comes bundled with most J2SDK installations. Below you see a JConsole from Apples Java running on my MacOS X workstation connected to Cacao running on a remote Linux machine.

JConsole connected to Cacao

Note that there (still) are some restrictions on the current support:

  1. Some of the VM internal management functions are not yet fully implemented. Those functions are defined by HotSpots JMM interface (the thing called jmm.h). It will take some time and patience until all of them are implemented.
  2. Only OpenJDK provides a reference implementation of the JMX agent, so at the moment there is no support for GNU Classpath.
  3. The thing that baffled me most, was that the documentation stated that applications running on the same machine inside another HotSpot VM process can be monitored without starting the JMX agent. I found out that HotSpot creates a shared memory region to which you can attach another VM process. I don’t like the idea of sharing memory across VM processes at all, so Cacao does not (and probably never will) support this feature. But I implemented the necessary stubs to avoid UnsatisfiedLinkageErrors and make everything run smoothly. So don’t wonder if you can’t see a list of locally running Cacao processes in JConsole. If you are interested, all the functionality to access this shared memory is hidden in sun.misc.Perf.

And finally, how do you make Cacao start the JMX agent? Try the snippet below. If you want to know more about those magic properties, try one of the thousand other articles out there dealing with this topic.

$ java -Dcom.sun.management.jmxremote \
       -Dcom.sun.management.jmxremote.port=9999 \
       -Dcom.sun.management.jmxremote.authenticate=false \
       -Dcom.sun.management.jmxremote.ssl=false

Have fun monitoring and managing!

Comments

VigRX

There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.

Abercrombie and fitch employee

Your Highness, I have no need of this hypothesis.

insanity

You can pretend to be serious; you can't pretend to be witty.

p90x plus

Either he's dead or my watch has stopped.

Extenze Male Enhancement

The graveyards are full of indispensable men.

tiffany jewellery

Fill what's empty, empty what's full, and scratch where it itches.

Wedding

Military glory -- that attractive rainbow, that rises in showers of blood -- that serpent's eye, that charms to destroy...

Propecia side effects

Heav'n hath no rage like love to hatred turn'd, Nor Hell a fury, like a woman scorn'd.

Buy Vicodin

When you hear hoofbeats, think of horses, not zebras.

VigRX Plus

Any fool can criticize, condemn, and complain - and most fools do.

GHD

If you can't get rid of the skeleton in your closet, you'd best teach it to dance.

Wedding Invitations

It is dangerous to be right when the government is wrong.

xenon lights

Invading Iraq after 9/11 was like invading Mexico after Pearl Harbor.

Buy Cialis

You have to stay in shape. My grandmother, she started walking five miles a day when she was 60. She's 97 today and we don't know where she is!

Supra shoes

Look at you in war. There has never been a just one, never an honorable one, on the part of the instigator of the war.

Extenze Male Enhancement

Love is the answer - but while you're waiting for the answer sex raises some pretty good questions.

vigrx

If you believe in telekinesis, raise my hand.

Milfs

If the United Nations once admits that international disputes can be settled by using force, then we will have destroyed the foundation of the organization and our best hope of establishing a world order.

Shemale

One out of every three Americans is suffering from some form of mental illness. Think of two of your best friends. If they are OK, then it must be you.