I have a large Java app that uses massive amounts of memory at times and I would like to monitor this at intervals to see if heap or permgen limits are reached or have gotten near to them.
How can I print out the most relevant pieces of mem usage information using java?
Here’s a snippet from a piece of code we have that periodically logs the memory usage of our app: