From e88b0dada2154b98194fd0ee2d35e30babdda703 Mon Sep 17 00:00:00 2001 From: =?utf8?q?F=E1=B4=80=CA=99=C9=AA=E1=B4=87=C9=B4=20W=E1=B4=87=CA=80?= =?utf8?q?=C9=B4=CA=9F=C9=AA?= Date: Fri, 12 Aug 2016 13:04:00 +0200 Subject: [PATCH] address @octo and @rubenk's comments Change-Id: I5661a555d95227e63b3c873a0fd0b2360a040342 --- src/cpu.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/cpu.c b/src/cpu.c index d194872f..c8566059 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -466,11 +466,9 @@ static void cpu_commit_one (int cpu_num, /* {{{ */ /* Commits the number of cores */ static void cpu_commit_num_cpu (gauge_t num_cpu) /* {{{ */ { -//// static void submit_value (int cpu_num, int cpu_state, const char *type, value_t value) value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - /// memcpy(&values[0], &value, sizeof(value)); values[0].gauge = num_cpu; vl.values = values; @@ -478,9 +476,7 @@ static void cpu_commit_num_cpu (gauge_t num_cpu) /* {{{ */ sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "cpu", sizeof (vl.plugin)); - sstrncpy (vl.type, "gauge", sizeof (vl.type)); - sstrncpy (vl.type_instance, "ncpu", - sizeof (vl.type_instance)); + sstrncpy (vl.type, "count", sizeof (vl.type)); plugin_dispatch_values (&vl); } /* }}} void cpu_commit_num_cpu */ @@ -520,9 +516,7 @@ static void cpu_commit (void) /* {{{ */ }; if (report_num_cpu) - { cpu_commit_num_cpu ((gauge_t) global_cpu_num); - } if (report_by_state && report_by_cpu && !report_percent) { -- 2.30.2