+#elif KERNEL_FREEBSD
+ /* FreeBSD currently only has 1 freq setting. See BUGS in cpufreq(4) */
+ char mib[] = "dev.cpu.0.freq";
+ int cpufreq;
+ size_t cf_len = sizeof(cpufreq);
+
+ if (sysctlbyname(mib, &cpufreq, &cf_len, NULL, 0) != 0) {
+ WARNING("cpufreq plugin: sysctl \"%s\" failed.", mib);
+ return 0;
+ }
+
+ value_t v;
+ /* convert Mhz to Hz */
+ v.gauge = cpufreq * 1000000.0;
+
+ cpufreq_submit(0, "cpufreq", NULL, &v);
+#endif