From: Vincent Brillault Date: Thu, 12 Feb 2015 18:50:29 +0000 (+0100) Subject: Turbostat: frequency add Averange, rename Buzy X-Git-Tag: collectd-5.5.0~24^2~23 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=789f46de545957165164c09b0584dc0f9b8fe5c0;p=collectd.git Turbostat: frequency add Averange, rename Buzy Partial backport of fc04cc67ea8f44124f048832a745a24bc2fa12fa from Len Brown Add Avg_MHz column, which is the frequency that many users expect to see -- the total number of cycles executed over the measurement interval. People found the previous GHz to be confusing, since it was the speed only over the non-idle interval. That measurement has been re-named Bzy_MHz. --- diff --git a/src/turbostat.c b/src/turbostat.c index cd2cf434..fef1b1e3 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -580,9 +580,10 @@ submit_counters(struct thread_data *t, struct core_data *c, struct pkg_data *p) if (!aperf_mperf_unstable) turbostat_submit(name, "percent", "c1", 100.0 * t->c1/t->tsc); - /* GHz */ + turbostat_submit("Average", "frequency", name, 1.0 / 1000000 * t->aperf / interval_float); + if ((!aperf_mperf_unstable) || (!(t->aperf > t->tsc || t->mperf > t->tsc))) - turbostat_submit(NULL, "frequency", name, 1.0 * t->tsc / 1000000000 * t->aperf / t->mperf / interval_float); + turbostat_submit("Buzy", "frequency", name, 1.0 * t->tsc / 1000000 * t->aperf / t->mperf / interval_float); /* SMI */ turbostat_submit(NULL, "current", name, t->smi_count);