Menu

Home

Ebrahim Aharpour

How to install Heap Monitor

  1. Download Heap Monitor war file
  2. Drop it in your favorite Web container e.g. Tomcat, Jetty, Jboss and etc.
  3. (Optional) to be able to use the admin panel you need to define a security realm with the "Heap Monitor Realm". Then users with the role "admin" can use admin page.

How to use Heap Monitor

After installing the war file you can browse to 'http(s)://mydomain/heap-monitor/' you will see a JSON object similar to

{
memory-maximum: 1877213184,
memory-taken: 126550016,
memory-free: 110573840,
percentage-memory-used: 0.8510581609041161,
memory-in-use: 15976176,
memory-total-free: 1861237008
}

one also can get individual parameters via 'http://mydomain/heap-monitor/parameter-name/' for example 'http(s)://mydomain/heap-monitor/percentage-memory-used/' return

0.97454077970081

which means 0.97 percent of the maximum heap space is currently in use please notice that when Heap Monitor detect heap usage of over 95 percent it invokes a garbage collection sleep for 500 milliseconds and monitors the heap again. So reading over 95 percent indicates that the server is run low in memory.
if you want to invoke a garbage collection manually, you can do so via the admin panel at 'http(s)://mydomain/heap-monitor/admin/'


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.