Database Reference
In-Depth Information
system:get-memory-max ()
- system:get-memory-total ()
- system:get-memory-free ()
)
} </available>
</memory>
The figures of interest here are really max and available . These report how much
memory eXist may use in total before it receives an OutOfMemoryError and the
amount of remaining memory available to eXist, respectively, while allocated gives
a breakdown of the current memory use.
VisualVM
VisualVM is a truly excellent GUI tool (built with the NetBeans platform) that allows
you to connect to any JVM and peer inside it to see exactly what is happening. Visu‐
alVM can provide a great deal of information about a running JVM; however, as this
is not a book on VisualVM, we will just look at the memory statistics that it can
provide.
If you have a modern JDK (version 7 or later) from Oracle, then VisualVM is pro‐
vided with it; otherwise, VisualVM may be available as a package for your system or
can be downloaded from https://visualvm.java.net . Once you have VisualVM
installed, you start it by simply running the jvisualvm command.
If you are running VisualVM on the same machine as eXist, VisualVM can directly
connect to any local Java process. Thus, upon starting VisualVM, you will see a list of
running Java processes, from which you can simply select org.exist.start.Main
(see Figure 15-4 ).
Conversely, if you wish to connect to a remote eXist instance with VisualVM, you
can either install jstatd on your eXist server and then connect remotely using Visu‐
alVM, or connect remotely from VisualVM via JMX (see “JMX” on page 387 ).
Java Mission Control
Java Mission Control (JMC), which is built on the Eclipse rich client platform and
shown in Figure 15-5 , is another project that in some ways is similar to VisualVM. It
was added to Oracle's JDK in JDK 7 update 40 (quite some time after VisualVM).
While it is likely that VisualVM will be adopted in the OpenJDK in the future, it is
unlikely that the same will happen for JMC, as it contains technology from what was
previously known as JRockit and is not open source. Therefore, JMC can be consid‐
ered proprietary to Oracle JDKs at present.
Search WWH ::




Custom Search