On Mon, Jan 14, 2008 at 05:24:40AM -0800 Jeremy Chadwick mentioned: > > I'm attempting to retrieve the integer values for dev.cpu.X.temperature. > For example, using sysctlbyname("dev.cpu.X.temperature") does work, but > the results returned in *oldp don't match that of what sysctl(8) shows. > This lead me to consider using sysctlnametomib("dev.cpu.X"), which also > returns success, but from there I'm confused... >
sysctl converts temperature values to Celsius or Farenheit according to locale, e.g.: printf("%.1fC", (mv - 2732.0) / 10); When you retrive value using sysctlbyname, it's raw number, and it'll differ from what sysctl displays. -- Stanislav Sedov ST4096-RIPE _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"