]> granicus.if.org Git - sysstat/commitdiff
Don't count CPU "all" twice when displaying a RESTART message
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 24 Dec 2017 16:06:08 +0000 (17:06 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 24 Dec 2017 16:06:08 +0000 (17:06 +0100)
file_hdr->sa_cpu_nr already includes CPU "all", so don't increment its
number when setting nr_ini variable.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa_common.c

index 8bfbab2b248f665208003d5778386d1781d9012d..8e8364133098070d068b72688d64b620654d63bd 100644 (file)
@@ -2510,7 +2510,7 @@ int print_special_record(struct record_header *record_hdr, unsigned int l_flags,
                 * reallocate buffers if needed.
                 */
                p = get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND);
-               act[p]->nr_ini = file_hdr->sa_cpu_nr + 1;       /* Dont't forget to count CPU "all" */
+               act[p]->nr_ini = file_hdr->sa_cpu_nr;
                if (act[p]->nr_ini > act[p]->nr_allocated) {
                        reallocate_all_buffers(act[p]);
                }