cpu plugin: Submit the right values in the Darwin code.
authorFlorian Forster <octo@huhu.verplant.org>
Wed, 13 Jun 2007 21:21:38 +0000 (23:21 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 13 Jun 2007 21:21:38 +0000 (23:21 +0200)
src/cpu.c

index 99e7a66..4c852a5 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
@@ -219,9 +219,9 @@ static int cpu_read (void)
                }
 
                submit (cpu, "user", (counter_t) cpu_info.cpu_ticks[CPU_STATE_USER]);
-               submit (cpu, "nice", (counter_t) cpu_info.cpu_ticks[CPU_STATE_USER]);
-               submit (cpu, "system", (counter_t) cpu_info.cpu_ticks[CPU_STATE_USER]);
-               submit (cpu, "idle", (counter_t) cpu_info.cpu_ticks[CPU_STATE_USER]);
+               submit (cpu, "nice", (counter_t) cpu_info.cpu_ticks[CPU_STATE_NICE]);
+               submit (cpu, "system", (counter_t) cpu_info.cpu_ticks[CPU_STATE_SYSTEM]);
+               submit (cpu, "idle", (counter_t) cpu_info.cpu_ticks[CPU_STATE_IDLE]);
 #endif /* PROCESSOR_CPU_LOAD_INFO */
 #if PROCESSOR_TEMPERATURE
                /*