1
votes

I'm quite new to Bluemix and have been playing around a bit with the WebSphere liberty profile using a sample application. I used the Monitoring and Analytics service in order to get some performance related data, but this doesn't provide enough data to truly analyse the application's behaviour.

In order to truly analyze the behaviour of the JVM, I would need verbose Garbage Collection logging. I tried to activate this through the environment variables, by adding for Name "verbose" and Value "gc", combined with "Xloggc" and "verbosegc.log". The application started fine, but no logs were created.

Question:
Does anyone know how to activate verbosegc logging for liberty on Bluemix?

Basically I could extend the question to all GC related parameters... GC Policy, Nursery size. Is it possible to control such variables in Bluemix?

1

1 Answers

2
votes

You can accomplish this by going into your Liberty configuration and adding the verbose:gc option to your jvm.options file.

Here is the location of jvm.options file in bluemix:

Location of jvm.options for Liberty in bluemix

There will be a bunch of JVM options in there by default.
Insert this option into the file on it's own line:
-verbose:gc

for additional garbage collection infomartion, these options may also be useful:
-XX:+PrintGCDetails (OpenJDK only)
-XX:+PrintGCTimeStamps (OpenJDK only)

For more info on customizing the JVM for Liberty, see the following: