From owner-freebsd-questions@freebsd.org Sun Aug 14 13:14:04 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED66ABB97E0 for ; Sun, 14 Aug 2016 13:14:04 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D5D175F for ; Sun, 14 Aug 2016 13:14:03 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u7EDDwuL096836; Sun, 14 Aug 2016 23:13:58 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sun, 14 Aug 2016 23:13:57 +1000 (EST) From: Ian Smith To: "William A. Mahaffey III" cc: freebsd-questions@freebsd.org Subject: Re: Monitoring server for crashes In-Reply-To: Message-ID: <20160814222921.O79687@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 13:14:05 -0000 In freebsd-questions Digest, Vol 636, Issue 8, Message: 7 On Sat, 13 Aug 2016 13:32:05 -0453.75 "William A. Mahaffey III" wrote: > On 08/13/16 09:33, Ian Smith wrote: [..] > > #!/bin/sh > > # 19Feb16 loadavg_daily .. every 10 seconds from 02:59 to 03:09 (run by cron) > > log='/root/loadavg_daily.log' > > secs=10 > > i=0 > > /root/bin/x200stat >> $log # or something else, or nothing .. > > while [ $i -lt 60 ]; do > > echo -n "`uptime` " >> $log > > echo "`sysctl -n hw.acpi.thermal.tz0.temperature`" \ > > "`sysctl -n hw.acpi.thermal.tz1.temperature`" >> $log > > sleep $secs > > i=$((i + 1)) > > done > > /root/bin/x200stat >> $log > > echo >> $log > > ======= > > > > Check sysctl hw.acpi.thermal for your thermal zones of interest. > Out of curiosity, I tried the above command under 9.3R: I'm running a rather out of date stable/9 on that one. 4.5 months to go. > [wam@kabini1, ~, 1:30:25pm] 581 % sysctl -n hw.acpi.thermal.tz1.temperature > sysctl: unknown oid 'hw.acpi.thermal.tz1.temperature' > When did it become available ? On my Lenovo X200, in 2008 :) Yours clearly oesn't have a TZ1. We saw an HP laptop of some sort here recently that had 5 thermal zones, with TZ2 being the CPU/s temperature. Every model's BIOS / ACPI is different. Some will expose CPU, GPU, HDD and other hot things, perhaps with controllable fans. Some hide them .. > > Check sysctl hw.acpi.thermal for your thermal zones of interest. And read acpi_thermal(4) cheers, Ian