X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fturbostat.c;h=e4419b85689ea5003d06b799ec37982abcecfa88;hb=0d9f395599348e735e6f461e1c328293bef0d060;hp=1049fb2ad3ce0803254e0cb35c8381a40234e86a;hpb=68c08bd380d63281f5707e893c27f952c5fde1d8;p=collectd.git diff --git a/src/turbostat.c b/src/turbostat.c index 1049fb2a..e4419b85 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -41,7 +41,7 @@ #include "plugin.h" #include "utils_time.h" -#include +#include "msr-index.h" #include #ifdef HAVE_SYS_CAPABILITY_H #include @@ -585,7 +585,10 @@ static int submit_counters(struct thread_data *t, struct core_data *c, /* If not using logical core numbering, set core id */ if (!config_lcn) { - snprintf(name, sizeof(name), "core%02d", c->core_id); + if (topology.num_packages > 1) + snprintf(name, sizeof(name), "pkg%02d-core%02d", p->package_id, c->core_id); + else + snprintf(name, sizeof(name), "core%02d", c->core_id); } if (do_core_cstate & (1 << 3))