IBM Support

Oracle SDK -XX:+PrintGCDateStamps option

Question & Answer


Question

Can you have a verbose GC log with date and time format on an Oracle JVM?

Answer

Yes. You can do that by using -XX:+PrintGCDateStamps option which is introduced in Oracle Java 6 and later versions. You can use this option for IBM WebSphere Application Server (WSAS) 7.0 and later versions on Solaris and HP-UX platform.


How to use it:
By adding -XX:+PrintGCDateStamps option into generic JVM arguments and enabling verbose garbage collection (verbosegc) from the WSAS administrative console.

Setting generic JVM arguments in WebSphere Application Server
Enabling verbose garbage collection (verbosegc) in WebSphere Application Server



How it works:
By the -XX:+PrintGCDateStamps option, Oracle JVM records each verbosegc cycle with new date and timestamp format into the native_stdout.log files by default. For example:

2013-02-18T20:09:34.265+0900: [GC [DefNew: 89K->0K(4992K), 0.0004644 secs][Tenured: 7956K->143K(10944K), 0.0175816 secs] 8045K->143K(15936K), [Perm : 1801K->1801K(12288K)], 0.0181751 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]



How to analyze the verbosegc logs:
You can use GCMV or PMAT for the analysis.

Version 2.7 of "IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (GCMV)" supports verbosegc logs from -XX:+PrintGCDateStamps option.

Update: Garbage Collection and Memory Visualizer (GCMV) 2.7 for IBM Support Assistant

Version 4.4.1 of "IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)" is also supports this date and timestamp format for the analysis.

IBM Pattern Modeling and Analysis Tool for Java Garbage Collector

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java SDK","Platform":[{"code":"PF010","label":"HP-UX"},{"code":"PF027","label":"Solaris"}],"Version":"8.5;8.0;7.0","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21625834