sysctl question

William A. Mahaffey III wam at hiwaay.net
Thu May 14 14:13:51 UTC 2015


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 at kabini1, /etc, 9:18:34am] 369 % sysctl dev.amdtemp.0.sensor_offset=24
sysctl: unknown oid 'dev.amdtemp.0.sensor_offset'
[root at kabini1, /etc, 9:18:36am] 370 % sysctl amdtemp.0.sensor_offset=24
sysctl: unknown oid 'amdtemp.0.sensor_offset'
[root at 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 at 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 at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
[wam at kabini1, ~, 9:19:39am] 399 %


-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.



More information about the freebsd-questions mailing list