Date: Mon, 25 Feb 2013 05:40:00 +0400 From: Dmitry Sarkisov <ait.mlist@gmail.com> To: freebsd-acpi@freebsd.org Subject: acpi_termal sysctl interface strange temperature value Message-ID: <20130225014000.GA6413@aperturescience.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130225014000.GA6413>