acpi_termal sysctl interface strange temperature value
Dmitry Sarkisov
ait.mlist at gmail.com
Mon Feb 25 01:40:12 UTC 2013
Hello,
I'm trying to poll cpu temperature with the following code:
#define TEMP_MIB "hw.acpi.thermal.tz0.temperature"
size_t len;
int t;
len = sizeof(t);
bzero(temp, len);
if(sysctlbyname(TEMP_MIB, &t, &len, NULL, 0) == -1 ){
perror("sysctl");
return -1;
}else{
printf("%d\n", t);
}
Values I'm geting are like this:
3732
while actual is:
sysctl -n hw.acpi.thermal.tz0.temperature
55.0C
Any advices are much appreciated.
Please cc me, as I'm not subscribed.
ps: I'm using
i386 9.1-RELEASE
--
Dmitry Sarkisov
<-\ Powered by
<-------------------o
<-/ FreeBSD
More information about the freebsd-acpi
mailing list