问题
I would like to directly read the minimum temperate at which the TCC will be activated from the TEMPERATURE_TARGET register in my Intel i7-5930k. The Socket Thermal Guide (http://www.intel.com/content/www/us/en/processors/core/core-i7-lga2011-3-tmsdg.html) from intel says there is a software readable field in the TEMPERATURE_TARGET register. Is there a way to read this field to get the absolute processor Temperature in Linux using either a command line tool or a writing some code?
回答1:
It depends on the OS.
On linux, you can read it using rdmsr
(read model
specific registers)
On ubuntu, you could try something like the following:
sudo apt-get install msr-tools
sudo modprobe msr
sudo rdmsr --bitfield 15:8 -c 0x00001a2
sudo rdmsr --bitfield 23:16 -c 0x00001a2
Returns 0x12
and 0x69
on my machine.
Explanation
From the Thermal Mechanical Design Guidelines (page 20):
- Temperature Control (T_CONTROL ) Offset: MSR (1A2h) TEMPERATURE_TARGET[15:8]
- TCC Activation Temperature: MSR (1A2h) TEMPERATURE_TARGET[23:16]
0x00001a2
is the register number.- The first
rdmsr
command reads the field Temperature Control Offset. - The second
rdmsr
command reads the field TCC Activation Temperature.
来源:https://stackoverflow.com/questions/37400005/reading-temperature-target-directly-from-cpu