From: Vincent Brillault Date: Wed, 11 Feb 2015 21:06:45 +0000 (+0100) Subject: Turbostat: Add (back) sanity check X-Git-Tag: collectd-5.5.0~24^2~22 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1338ab9feef6eb7f54066704486e0c384f0428cb;p=collectd.git Turbostat: Add (back) sanity check This new gauge contains TSC / interval_float. If TSC and interval_float are behaving correctly, this is supposed to be constant. Otherwise, other measurements can be wrong --- diff --git a/src/turbostat.c b/src/turbostat.c index fef1b1e3..6cd39a18 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -585,6 +585,9 @@ submit_counters(struct thread_data *t, struct core_data *c, struct pkg_data *p) if ((!aperf_mperf_unstable) || (!(t->aperf > t->tsc || t->mperf > t->tsc))) turbostat_submit("Buzy", "frequency", name, 1.0 * t->tsc / 1000000 * t->aperf / t->mperf / interval_float); + /* Sanity check (should stay stable) */ + turbostat_submit("TSC", "gauge", name, 1.0 * t->tsc / 1000000 / interval_float); + /* SMI */ turbostat_submit(NULL, "current", name, t->smi_count);