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
_______________________________________________
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"

Reply via email to