Layer 7 Identity Management

Setting Garbage collection logging for the JVM 

07-31-2015 03:07 PM

Sometimes it is needed to log garbage collection when running any JVM.
These JVM parameters can be added to any server while this document talks about adding them to Jboss,
you can use WebSphere's admin console edit the app server and add them as JVM properties there also.

 

For implementing in jboss 6.2 on windows locate the stadalone.bat
Typically C:\jboss-eap-6.2\bin\standalone.conf.bat

edit the standalone.conf.bat find this line:


rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms1G -Xmx2G -XX:MaxPermSize=256M"

 

change it to this line:
rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms1G -Xmx2G -XX:MaxPermSize=256M -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause"

 

With this test in place, if you did not redirect to a new log
You will see lines like this in the server.log:

223.014: [GC (Allocation Failure) [PSYoungGen: 410443K->37720K(534016K)] 790868K
->470233K(1233408K), 0.8573984 secs] [Times: user=0.97 sys=0.39, real=0.86 secs]

 

real=0.86 secs   Should always be a round up of , 0.8573984 secs]

 

The above message is a regular GC, there a different messages for a FULL GC

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

07-31-2015 03:11 PM

And as always if there is a problem setting this, please open a support ticket with a link to this post.

Related Entries and Links

No Related Resource entered.