From: Sebastien GODARD Date: Sun, 6 Feb 2022 16:41:46 +0000 (+0100) Subject: A_IRQ: sar: Always display a header line for each sample X-Git-Tag: v12.5.6~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee919f007fd759211927fc1a989619229e6dfc48;p=sysstat A_IRQ: sar: Always display a header line for each sample Make sure that the header line gets printed with each sample. This is because CPU can go offline or come back online, and so the header line needs to be updated accordingly. Signed-off-by: Sebastien GODARD --- diff --git a/pr_stats.c b/pr_stats.c index e9023cf..6d62fd7 100644 --- a/pr_stats.c +++ b/pr_stats.c @@ -356,10 +356,12 @@ __print_funct_t print_irq_stats(struct activity *a, int prev, int curr, /* Identify offline and unselected CPU, and keep persistent statistics values */ get_global_int_statistics(a, prev, curr, flags, masked_cpu_bitmap); - if (dish || DISPLAY_ZERO_OMIT(flags)) { - print_hdr_line(timestamp[!curr], a, FIRST, DISPLAY_PRETTY(flags) ? -1 : 0, 9, - masked_cpu_bitmap); - } + /* + * Always display header line. The columns may vary if e.g. a CPU goes offline + * and/or comes back online. + */ + print_hdr_line(timestamp[!curr], a, FIRST, DISPLAY_PRETTY(flags) ? -1 : 0, 9, + masked_cpu_bitmap); for (i = 0; i < a->nr2; i++) {