GCViewer
GCViewer copied to clipboard
OpenJDK - additional tags fail parsing
-Xlog:gc=trace:file=/tmp/gc-%p-%t.log:tags,utc,uptime,level,hostname,tid
From my understanding the addtional tags of hostname and tid should just get ignored and the gc line should be parsed, however this is what i am seeing:
INFO [DataReaderFacade]: GCViewer version 1.36 (2019-11-30T21:36:26+0000) INFO [DataReaderFactory]: File format: Oracle / OpenJDK unified jvm logging INFO [DataReaderUnifiedJvmLogging]: Reading Oracle / OpenJDK unified jvm logging format... INFO [DataReaderUnifiedJvmLogging]: Using G1 WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 6 (no match; line="[2020-04-22T12:36:40.485+0000][2.185s][boxname][5702][info ][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 53M->9M(1024M) 12.513ms") WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 7 (no match; line="[2020-04-22T12:36:40.652+0000][2.353s][boxname][5702][info ][gc] GC(1) Pause Young (Concurrent Start) (Metadata GC Threshold) 23M->11M(1024M) 12.716ms") WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 8 (no match; line="[2020-04-22T12:36:40.652+0000][2.353s][boxname][5698][info ][gc] GC(2) Concurrent Cycle") WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 9 (no match; line="[2020-04-22T12:36:40.674+0000][2.374s][boxname][5702][info ][gc] GC(2) Pause Remark 13M-13M(1024M) 3.651ms") WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 10 (no match; line="[2020-04-22T12:36:40.685+0000][2.385s][boxname][5702][info ][gc] GC(2) Pause Cleanup 13M-13M(1024M) 0.199ms") WARNING [DataReaderUnifiedJvmLogging]: Failed to parse line number 11 (no match; line="[2020-04-22T12:36:40.698+0000][2.398s][boxname][5698][info ][gc] GC(2) Concurrent Cycle 45.472ms") INFO [DataReaderUnifiedJvmLogging]: Reading done.
Thank you for reporting this issue!
According to the readme, currently only the decorations "tags", "time", "uptime" and "level" are supported. Additional decorations will break parsing (as you observed). See https://openjdk.java.net/jeps/158 for a detailed description of "tags" and "decorations".
=> This is a feature request. If you'd like to enhance the parser (DataReaderUnifiedJvmLogging.java) including some unittests, I'll happily add it to the code base.
Best regards, Jörg