From owner-freebsd-questions@FreeBSD.ORG Thu May 14 15:29:40 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 673FD21A for ; Thu, 14 May 2015 15:29:40 +0000 (UTC) Received: from smtp1.bway.net (smtp1.bway.net [216.220.96.27]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24C4B1970 for ; Thu, 14 May 2015 15:29:39 +0000 (UTC) Received: from gecko4 (host-216-220-115-31.dsl.bway.net [216.220.115.31]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: m1316v@bway.net) by smtp1.bway.net (Postfix) with ESMTPSA id 8AD0D9586E; Thu, 14 May 2015 11:29:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bway.net; s=mail; t=1431617378; bh=zE1qVvAd+gOEtOi8EGgldpVVpIrPxc4b8KI7/+zwN3k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:Reply-To; b=Kb+hOLwrTFea4ia72gHmcsEXaPjfHFi3qITlaaa5nk4FPEiuquK3eiYKcMNP3mJP5 UuFToqz5VVM67hLwbgK51tAsptPz58Dv6TRZ0N5Zj/LnJvJS2BcxEIwl+rYfJHYOqu o4N4D8SURECKoWk6Fd7mgFoG+wADIUrSYoSJChcE= Date: Thu, 14 May 2015 11:29:38 -0400 From: mfv To: "William A. Mahaffey III" Cc: "FreeBSD Questions !!!!" Subject: Re: sysctl question Message-ID: <20150514112938.69eb9dac@gecko4> In-Reply-To: <5554BABC.6080705@hiwaay.net> References: <55541052.6020802@hiwaay.net> <20150514055826.01e841ae@gecko4> <5554ABEF.4070300@hiwaay.net> <5554AD9D.9060201@hiwaay.net> <20150514105902.319e5f3f@gecko4> <5554BABC.6080705@hiwaay.net> Reply-To: mfv@bway.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 15:29:40 -0000 On Thu, 14 May 2015 10:16:03 -0453 "William A. Mahaffey III" wrote: > On 05/14/15 10:05, mfv wrote: > > On Thu, 14 May 2015 09:20:04 -0453 > > "William A. Mahaffey III" wrote: > > > >> On 05/14/15 09:12, William A. Mahaffey III wrote: > >>> On 05/14/15 05:04, mfv wrote: > >>>> Hello William, > >>>> > >>>> I had the same problem using amdtemp but used the sysctl setting > >>>> "dev.amdtemp.%d.sensor_offset" to make it more accurate. The > >>>> value was determined by comparing the unadjusted value of > >>>> admtemp with the value shown in the BIOS. In my case the setting > >>>> in /etc/sysctl.conf is: > >>>> > >>>> dev.amdtemp.0.sensor_offset=24 > >>>> > >>>> A room thermometer was also helpful to measure the difference by > >>>> comparing the difference between the room temperature and the > >>>> BIOS after the CPU was placed under load. > >>>> > >>>> To read the value I then bound the F2-key in csh.cshrc file as > >>>> follows: > >>>> > >>>> bindkey -c "^[OQ" 'sysctl -e dev.amdtemp.0.core0' > >>>> > >>>> The results of the reading are not as accurate as I would like > >>>> but are an improvement. > >>>> > >>>> Cheers ... __o > >>>> _ \<,_ > >>>> Marek (+)/ (+) > >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >>> P.S. Is there a way to set this on the fly, w/o a reboot ? > >>> TIA :-) .... > >>> > >> > >> [root@kabini1, /etc, 9:18:34am] 369 % sysctl > >> dev.amdtemp.0.sensor_offset=24 sysctl: unknown oid > >> 'dev.amdtemp.0.sensor_offset' [root@kabini1, /etc, 9:18:36am] 370 % > >> sysctl amdtemp.0.sensor_offset=24 sysctl: unknown oid > >> 'amdtemp.0.sensor_offset' [root@kabini1, /etc, 9:18:37am] 371 % > >> sysctl -A | grep -i amdtemp dev.amdtemp.0.%desc: AMD CPU On-Die > >> Thermal Sensors dev.amdtemp.0.%driver: amdtemp > >> dev.amdtemp.0.%parent: hostb5 > >> dev.amdtemp.0.sensor0.core0: 10.0C > >> [root@kabini1, /etc, 9:18:41am] 372 % uname -a > >> FreeBSD kabini1.local 9.3-RELEASE-p13 FreeBSD 9.3-RELEASE-p13 #0: > >> Tue Apr 7 03:01:12 UTC 2015 > >> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC > >> amd64 [wam@kabini1, ~, 9:19:39am] 399 % > >> > >> > > Yes, it is possible to do it on the fly: > > > > [10:55] ~ > > > dev.amdtemp.0.core0.sensor0=39.7C > > > > [10:55] ~ > sudo sysctl dev.amdtemp.0.sensor_offset=0 > > dev.amdtemp.0.sensor_offset: 24 -> 0 > > > > [10:55] ~ > > > dev.amdtemp.0.core0.sensor0=15.7C > > > > [10:55] ~ > sudo sysctl dev.amdtemp.0.sensor_offset=24 > > dev.amdtemp.0.sensor_offset: 0 -> 24 > > > > [10:55] ~ > > > dev.amdtemp.0.core0.sensor0=39.8C > > > > The 1st, 3rd and 5th command line are the results of the binding of > > the F2-key to the sysctl output. > > > > The 2nd command line sets the offset to the default of 0 while the > > 4th command line sets it back to 24 which is normally set in > > /etc/sysctl.conf. > > > > Your value will probably be different. > > > > Cheers ... > > > > Marek > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org" > > > > > When I tried as you did above as root (see farther above), it said > 'sysctl: unknown oid'. What version of FreeBSD are you using ? I'm on > 9.3R-p13, I suspect you might be on 10.1, & maybe that sysctl > variable isn't available under 9.3R .... > > You nailed it. I just checked the man pages of amdtemp on the FreeBSD website and discovered that the offset value was only introduced in the 10.0-RELEASE. I'm on the 10.1-RELEASE. Sorry for the goose chase. Cheers ... __o _ \<,_ Marek (+)/ (+) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~