MemoryMonitor demonstrates the use of the java.lang.management API
in observing the memory usage of all memory pools consumed by
the application.
This simple demo program queries the memory usage of each memory pool
and plots the memory usage history graph.
To run the MemoryMonitor demo
java -jar <JDK_HOME>/demo/management/MemoryMonitor.jar
FullThreadDump demonstrates the use of the java.lang.management API
to print the full thread dump. JDK 6 defines a new API to dump
the information about monitors and java.util.concurrent ownable
synchronizers.
VerboseGC demonstrates the use of the java.lang.management API to
print the garbage collection statistics and memory usage remotely
by connecting to a JMX agent with a JMX service URL:
service:jmx:rmi:///jndi/rmi://<hostName>:<portNum>/jmxrmi
where <hostName> is the hostname and <portNum> is the port number
to which the JMX agent will be connected.