From 06d7fbe8bb299e76cac532378e7b1999495979dc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ritschard Date: Thu, 16 Jan 2014 08:06:25 +0100 Subject: [PATCH] keep plugin instance for first cpu --- src/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpu.c b/src/cpu.c index 3882c6fd..1d7322c4 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -315,7 +315,7 @@ static void submit_value (int cpu_num, int cpu_state, const char *type, value_t sstrncpy (vl.type_instance, cpu_state_names[cpu_state], sizeof (vl.type_instance)); - if (cpu_num > 0) { + if (cpu_num >= 0) { ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance), "%i", cpu_num); } @@ -363,7 +363,6 @@ static void submit (int cpu_num, derive_t *derives) gauge_t percent; if (!report_percent && report_by_cpu) { - for (i = 1; i < CPU_SUBMIT_ACTIVE; i++) { if (derives[i] == -1) -- 2.30.2