summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ffc3836)
raw | patch | inline | side by side (parent: ffc3836)
author | Robert Viduya <robert@oit.gatech.edu> | |
Fri, 29 May 2015 21:47:21 +0000 (17:47 -0400) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 30 May 2015 17:19:26 +0000 (19:19 +0200) |
This appears to be a regression introduced in f14ab935. Thanks to Robert Viduya
for reporting the bug.
Signed-off-by: Florian Forster <octo@collectd.org>
for reporting the bug.
Signed-off-by: Florian Forster <octo@collectd.org>
src/cpu.c | patch | blob | history |
diff --git a/src/cpu.c b/src/cpu.c
index 57af2dd7f26b105f5aab16fabbc04b53a6342660..2a2a4a9715d20e9b76055d559edcb1b2f9e55aa1 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
continue;
}
- if (cpu_info_len < COLLECTD_CPU_STATE_MAX)
+ if (cpu_info_len < CPU_STATE_MAX)
{
ERROR ("cpu plugin: processor_info returned only %i elements..", cpu_info_len);
continue;
}
- cpu_stage (cpu, COLLECTD_CPU_STATE_USER, (derive_t) cpu_info.cpu_ticks[COLLECTD_CPU_STATE_USER], now);
- cpu_stage (cpu, COLLECTD_CPU_STATE_NICE, (derive_t) cpu_info.cpu_ticks[COLLECTD_CPU_STATE_NICE], now);
- cpu_stage (cpu, COLLECTD_CPU_STATE_SYSTEM, (derive_t) cpu_info.cpu_ticks[COLLECTD_CPU_STATE_SYSTEM], now);
- cpu_stage (cpu, COLLECTD_CPU_STATE_IDLE, (derive_t) cpu_info.cpu_ticks[COLLECTD_CPU_STATE_IDLE], now);
+ cpu_stage (cpu, COLLECTD_CPU_STATE_USER, (derive_t) cpu_info.cpu_ticks[CPU_STATE_USER], now);
+ cpu_stage (cpu, COLLECTD_CPU_STATE_NICE, (derive_t) cpu_info.cpu_ticks[CPU_STATE_NICE], now);
+ cpu_stage (cpu, COLLECTD_CPU_STATE_SYSTEM, (derive_t) cpu_info.cpu_ticks[CPU_STATE_SYSTEM], now);
+ cpu_stage (cpu, COLLECTD_CPU_STATE_IDLE, (derive_t) cpu_info.cpu_ticks[CPU_STATE_IDLE], now);
}
/* }}} #endif PROCESSOR_CPU_LOAD_INFO */