From: Sebastien GODARD Date: Wed, 7 Feb 2018 14:24:22 +0000 (+0100) Subject: SVG: A_PWR_CPU activity: Don't display offline CPU X-Git-Tag: v11.7.2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc311c6b3db2c3df52b8178aad86625f71ae1598;p=sysstat SVG: A_PWR_CPU activity: Don't display offline CPU Offline CPU are no longer displayed. This should also apply to CPU frequency statistics and its graphs. Signed-off-by: Sebastien GODARD --- diff --git a/svg_stats.c b/svg_stats.c index bf8ad82..e2867af 100644 --- a/svg_stats.c +++ b/svg_stats.c @@ -4188,6 +4188,10 @@ __print_funct_t svg_print_pwr_cpufreq_stats(struct activity *a, int curr, int ac spc = (struct stats_pwr_cpufreq *) ((char *) a->buf[curr] + i * a->msize); spp = (struct stats_pwr_cpufreq *) ((char *) a->buf[!curr] + i * a->msize); + if (!spc->cpufreq) + /* This CPU is offline: Don't display it */ + continue; + /* Should current CPU (including CPU "all") be displayed? */ if (!(a->bitmap->b_array[i >> 3] & (1 << (i & 0x07)))) /* No */ @@ -4221,7 +4225,7 @@ __print_funct_t svg_print_pwr_cpufreq_stats(struct activity *a, int curr, int ac draw_activity_graphs(a->g_nr, g_type, title, g_title, item_name, group, spmin + i, spmax + i, out + i, outsize + i, - svg_p, record_hdr, FALSE); + svg_p, record_hdr, i); } /* Free remaining structures */