nmonvisualizer / nmonvisualizer

A Java GUI tool for analyzing NMON and other system stats files
Apache License 2.0
168 stars 69 forks source link

Get an exception if nmon file has duplicate data. #78

Closed mnambrose closed 2 years ago

mnambrose commented 4 years ago

Here is the parsing error: WARNING T0001: DataType NETSIZE defines 10 fields but there are only 10 values; missing values set to 0 SEVERE could not parse C:/Users/eastlandr/Desktop/nmon/eddea06_200512.nmon java.lang.IllegalArgumentException: DataType NETSIZE already defined for timestamp T0001 at com.ibm.nmon.data.DataRecord.addData(DataRecord.java:74) at com.ibm.nmon.parser.NMONParser.parseData(NMONParser.java:568) at com.ibm.nmon.parser.NMONParser.parseLine(NMONParser.java:357) at com.ibm.nmon.parser.NMONParser.parse(NMONParser.java:100) at com.ibm.nmon.parser.NMONParser.parse(NMONParser.java:68) at com.ibm.nmon.NMONVisualizerApp.parse(NMONVisualizerApp.java:149) at com.ibm.nmon.gui.file.ParserRunner.run(ParserRunner.java:73) at java.lang.Thread.run(Unknown Source)

Data in the file looks like: ... PROC,T0001,0.63,0.10,1516,29600,4877,277,133,89,0,0 FILE,T0001,5,2857,62292,17865480,498617,0,0,0 NET,T0001,1.6,0.4,0.0,0.1,1.3,0.9,7.0,0.1,0.1,1.3 NETPACKET,T0001,5.3,3.9,0.3,0.4,21.7,4.8,3.1,0.4,0.6,21.7 NETSIZE,T0001,308.9,98.8,156.0,164.0,60.5,201.4,2305.6,163.5,150.7,60.5 NETSIZE,T0001,308.9,98.8,156.0,164.0,60.5,201.4,2305.6,163.5,150.7,60.5 NETERROR,T0001,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 NFSSVRV2,T0001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 NFSSVRV3,T0001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ...

I don't know why this version on nmon is duplicating the NETSIZE entry, but it would be great if this tool would just throw a warning and then ignore the duplicates.

hpresnall commented 4 years ago

Does the extra NETSIZE occur for every timestamp or just the first one? You can delete that line and it should process, but doing that for all the data is understandably harder.

If it's on every line, let me know and I can patch this for you.