Code

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 99e7a6699a11625edf1d16891fe85a00244e61de..4c852a53fea2405d66a3ec6a92829d5ea20aebb6 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
                /*