From owner-freebsd-questions@freebsd.org Sun Nov 4 17:36:10 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC6B910DF5FA for ; Sun, 4 Nov 2018 17:36:10 +0000 (UTC) (envelope-from thor@irk.ru) Received: from mail.irk.ru (relay2.dsi.ru [195.206.40.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8630F7BCAB for ; Sun, 4 Nov 2018 17:36:08 +0000 (UTC) (envelope-from thor@irk.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=irk.ru; s=dkim; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6PHTbXYtywChyrmGl0u1NW8oNcPhSUOvrVIqMjgSNkE=; b=el1p0Ir39Q3Ro9lj6qnqOzIch5 JLgGz/JYAfOu18zPZTHL8Vxc+qRvSOFgSz/bGfqZ4+sS1aps0/S6ilmW5jry3oMcywfEtTpR43TEb SKjjefJugT4eIPykiTbOxPpVx8o9Pipbjsqi+9S/dAnTL1rPirp30iozZKQSpbZnvDR0=; Received: from [194.176.114.54] (helo=[192.168.1.130]) by mail.irk.ru with esmtpa (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gJMId-0009FG-8u for freebsd-questions@freebsd.org; Mon, 05 Nov 2018 01:34:59 +0800 Subject: Re: Different temperature reports To: freebsd-questions@freebsd.org References: From: thor Message-ID: <1944f5b3-2b4f-df47-4ce4-33186305a32a@irk.ru> Date: Mon, 5 Nov 2018 01:35:57 +0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 8630F7BCAB X-Spamd-Result: default: False [-0.34 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[irk.ru]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.00)[country: RU(-0.02)]; NEURAL_SPAM_SHORT(0.67)[0.670,0]; DKIM_TRACE(0.00)[irk.ru:+]; MX_GOOD(-0.01)[relay1.dsi.ru,relay2.dsi.ru]; RCVD_IN_DNSWL_NONE(0.00)[175.40.206.195.list.dnswl.org : 127.0.10.0]; DMARC_POLICY_ALLOW(-0.50)[irk.ru,none]; RECEIVED_SPAMHAUS_PBL(0.00)[54.114.176.194.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8345, ipnet:195.206.32.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2018 17:36:11 -0000 Because these temperatures are measured in different places - in hdd (most possibly on it's controller board but could be inside a mechanics) and somewhere near the processor on the motherboard. Also, the sensors are not so precise. On 11/05/18 01:24, Carmel NY wrote: > Why would sysctl and smartctl report different temperatures? Smartctl is > reporting 30C and sysctl is showing 40.1C. > > #! /usr/bin/env bash > > TP=$(/usr/local/sbin/smartctl -a /dev/ada0 | grep Temp | awk -F " " '{printf "%d",$10}') > > printf "%s\n\n" "${TP}" > > TP2=$(/sbin/sysctl -a | grep -i hw.acpi.thermal.tz0.temperature | awk '{print substr($2,0,5)}') > > printf "%s\n\n" "${TP2}" > > exit > > Both temperatures are in Celsius. >