+ submit (cpu, "user", (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
+ /*
+ * Not all Apple computers do have this ability. To minimize
+ * the messages sent to the syslog we do an exponential
+ * stepback if `processor_info' fails. We still try ~once a day
+ * though..
+ */
+ if (cpu_temp_retry_counter > 0)
+ {
+ cpu_temp_retry_counter--;
+ continue;
+ }
+
+ cpu_temp_len = PROCESSOR_INFO_MAX;
+
+ status = processor_info (cpu_list[cpu],
+ PROCESSOR_TEMPERATURE,
+ &cpu_host,
+ cpu_temp, &cpu_temp_len);
+ if (status != KERN_SUCCESS)
+ {
+ ERROR ("cpu plugin: processor_info failed: %s",
+ mach_error_string (status));
+
+ cpu_temp_retry_counter = cpu_temp_retry_step;
+ cpu_temp_retry_step *= 2;
+ if (cpu_temp_retry_step > cpu_temp_retry_max)
+ cpu_temp_retry_step = cpu_temp_retry_max;
+
+ continue;
+ }
+
+ if (cpu_temp_len != 1)
+ {
+ DEBUG ("processor_info (PROCESSOR_TEMPERATURE) returned %i elements..?",
+ (int) cpu_temp_len);
+ continue;
+ }
+
+ cpu_temp_retry_counter = 0;
+ cpu_temp_retry_step = 1;
+
+ DEBUG ("cpu_temp = %i", (int) cpu_temp);
+#endif /* PROCESSOR_TEMPERATURE */
+ }
+/* #endif PROCESSOR_CPU_LOAD_INFO */
+
+#elif defined(KERNEL_LINUX)