vlsi / ksar

A sar grapher, fork of http://sourceforge.net/projects/ksar/
Other
246 stars 59 forks source link

ERROR net.atomique.ksar.graph.Graph - CPU 0 col 11 is missing #230

Closed ams-tschoening closed 3 years ago

ams-tschoening commented 3 years ago

Some of my SAR files contain lines like the following:

00:00:01        CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
00:00:01        all      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
00:00:01          0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          5      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          6      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:00:01          7      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
00:05:01        all      4.49      0.00      1.01      6.60      0.00      0.00      0.09      0.00      0.00     87.80
00:05:01          0      1.13      0.00      0.82      1.47      0.00      0.00      0.08      0.00      0.00     96.50

As one can see, for some reason the column %idle is either missing entirely or simply moved left by one for some reason and %gnice is missing instead. In my opinion the latter is more likely according to the other lines, which always have 0.00 for %gnice and an %idle of slightly less than 100.00. That rows result in a lot of error messages on like the following:

10:33:50.236 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 0 col 11 is missing 00:00:01          0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.237 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 1 col 11 is missing 00:00:01          1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.237 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 2 col 11 is missing 00:00:01          2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.237 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 3 col 11 is missing 00:00:01          3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.239 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 4 col 11 is missing 00:00:01          4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.239 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 5 col 11 is missing 00:00:01          5      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.239 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 6 col 11 is missing 00:00:01          6      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
10:33:50.239 [Thread-16] ERROR net.atomique.ksar.graph.Graph - CPU 7 col 11 is missing 00:00:01          7      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00

Does anyone know why this happens? Obviously the data generated is wrong already, but I didn't find any reason.

Is there some way in ksar to work around such problems? Like simply using column 10 as the missing column 11 and making column 10 having the value 0 instead?

Pitterling commented 3 years ago

please create this issue at sysstat repo It seems to affect you in case all values are zero.

there is no workaround in ksar itself. You need to fix the input data as you pointed out

ams-tschoening commented 3 years ago

Your link seems wrong, I guess you meant the following:

https://github.com/sysstat/sysstat

I've created an issue: https://github.com/sysstat/sysstat/issues/288

Pitterling commented 3 years ago

yes, of course :)