From owner-freebsd-acpi@FreeBSD.ORG Mon Feb 25 01:40:12 2013 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8966A270 for ; Mon, 25 Feb 2013 01:40:12 +0000 (UTC) (envelope-from ait.mlist@gmail.com) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 17B2B2F2 for ; Mon, 25 Feb 2013 01:40:11 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id s4so1875491lbc.35 for ; Sun, 24 Feb 2013 17:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:mime-version :content-type:content-disposition:x-operating-system:user-agent; bh=UmOUyzxWyzUkzpjJ9VdX1JC6C+DzukqyjgW2q2YIu1Y=; b=f6wlp8fPtgzUn7roWQWSV15wCz1+qSYi00lp1q80iolNiyh2teRS1U888kNIlMnZUq EXokt+zYzuXQBKlaxAO9Hr+lBOpwPm8a/oZxVV1CpOT5wLT1GQ2OSz5WVafnwbqMWNOI 7jGAXzzbQ9CeI5nA5R8HKWZ8pcG9DVKmYuHl4rdNX8rN2SaoazCGcYdTjfoF7jHJs7so 7a8mcYoW2PhIIwKeIJEtxpjJAELA3xSYYoVOydZjZc/Pdau9Sk37CfNjDkAxl+Pml/o+ SrV/tX7hSQNcQkjshtw5ND95LWjZqJ2LJHvFWL0mXKIsIyyjtCGbLqyfy12PpKk2Ie0l VYcQ== X-Received: by 10.152.147.130 with SMTP id tk2mr8373323lab.24.1361756404634; Sun, 24 Feb 2013 17:40:04 -0800 (PST) Received: from a3500l ([109.165.59.127]) by mx.google.com with ESMTPS id i3sm3534268lbn.0.2013.02.24.17.40.01 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 24 Feb 2013 17:40:03 -0800 (PST) Received: by a3500l (sSMTP sendmail emulation); Mon, 25 Feb 2013 05:40:00 +0400 Date: Mon, 25 Feb 2013 05:40:00 +0400 From: Dmitry Sarkisov To: freebsd-acpi@freebsd.org Subject: acpi_termal sysctl interface strange temperature value Message-ID: <20130225014000.GA6413@aperturescience.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 9.1-RELEASE i386 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 01:40:12 -0000 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