summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f31a12e)
raw | patch | inline | side by side (parent: f31a12e)
author | Fᴀʙɪᴇɴ Wᴇʀɴʟɪ <faxmodem@collectd.org> | |
Fri, 12 Aug 2016 11:04:00 +0000 (13:04 +0200) | ||
committer | Fᴀʙɪᴇɴ Wᴇʀɴʟɪ <faxmodem@collectd.org> | |
Fri, 12 Aug 2016 11:04:00 +0000 (13:04 +0200) |
Change-Id: I5661a555d95227e63b3c873a0fd0b2360a040342
src/cpu.c | patch | blob | history |
diff --git a/src/cpu.c b/src/cpu.c
index d194872f0fd42005b64775e65521b9367497edeb..c85660593497cc8e202dc344996362227e3357b2 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
/* 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;
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 */
};
if (report_num_cpu)
- {
cpu_commit_num_cpu ((gauge_t) global_cpu_num);
- }
if (report_by_state && report_by_cpu && !report_percent)
{