Java Management Extensions (JMX) are a powerful set of APIs used to monitor and manage a running JVM. The building blocks of JMX are the so-called Management Beans (MBeans), which are basically wrappers that decorate existing objects with a management interface. The core classes of JVM are decorated with MBeans.
More information about JMX can be found at http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html.
MBeans are registered with an MBeanServer that exposes those management interfaces to external clients. Applications are free to create, register, and expose the management interface of their own specific services. Solr MBeans are not automatically registered with the MBeanServer, but if you want to do that, just write (or uncomment) the following line in solrconfig.xml
:
<jmx/>
The JVM comes with two built-in JMX clients called JConsole and JVisualVM.
Open a shell in your PC and type the following command:
# $JAVA_HOME/bin/jconsole
A dialog pop-up will appear. This is the first screen of JConsole, which is a Java standalone application. The dialog contains a list of locally running JVMs. One of them should be the one where Solr is running. Select that entry, and you should see a screen with several tabs: Overview, Memory, Threads, Classes, VM Summary, and MBeans. At the moment, we are interested in the last tab, MBeans. Here you can see (the tree component on the left side) all registered MBeans, as depicted in the following screenshot:
For each MBean in the tree, you can see its management interface in the right pane. A management interface is composed of attributes and operations.
Operations can be invoked and attributes can be monitored by looking at their value at a given moment or for a given interval. To do this, you have to double-click on them and activate a real-time chart.
The main differences between the Solr Administration Console and JConsole are as follows:
Clearly, JConsole, JVisualVM, and the Solr Administration Console are not alternatives. They should be used together in order to get a different perspective on the system.
3.145.17.18