X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fturbostat.c;h=629d792547a315abecb0977b2d332c706568017a;hb=39755bc4eaaea9b453ed423253bc7c478fbd95e5;hp=9373b61a6a6c20f9ff4f9ccc864ea3a762ef42bc;hpb=6c686b0dcc980107a900180dba2682281ee253c8;p=collectd.git diff --git a/src/turbostat.c b/src/turbostat.c index 9373b61a..629d7925 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -1258,6 +1258,9 @@ allocate_counters(struct thread_data **threads, struct core_data **cores, struct if (*threads == NULL) goto err; + for (i = 0; i < total_threads; ++i) + (*threads)[i].cpu_id = topology.max_cpu_id + 1; + total_cores = topology.num_cores * topology.num_packages; *cores = calloc(total_cores, sizeof(struct core_data)); if (*cores == NULL)