Sunday, April 17, 2011

Finding current PermGen size via JConsole

It is not exactly rocket science but sometimes it is the simplest tasks that lack instructions around them.

Any Java developer would have faced the out of memory error with the cause being the limit for JVM's PermGen (Permanent Generation) size. If you are walking in on an environment or project, it is not immediately clear as to how you can get the JVM to simply spit out the current PermGen size without looking around in batch/shell files or system environment for any earlier tweaks.

This is where JConsole is great for quickly figuring out the current PermGen size because it present on any system with a Java JDK installed on it.
  1. Connect to the JVM with JConsole.
  2. Click on the Memory tab.
  3. From the Chart drop-down select the Memory Pool "PS Perm Gen" option.
  4. After a few seconds the Details panel at the bottom right will refresh and the current Max for the permgen will be shown.


Unable to display content. Adobe Flash is required.

0 comments:

Post a Comment