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