I am troubleshooting CPU prochot issues and using powershell to gather data when throttling occurs, using the Intel PCM tool, pcm-msr.exe to read specific registers such as : IA32_THERM_STATUS. 0x19c
sample command :
psm-msc.exe 0x19c
Read value 0x883d2800 from MSR 0x19c on core 0
I then have to look up the hex value 0x883d2800 in the bit field table listed here https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3b-part-2-manual.pdf page 14.10 Vol 3B.
Never having done anything like this I search for “Powershell bit field” and found one example that uses flags
Based on the example this example : Managing Bit Flags (Part 1) - Power Tips - Power Tips - IDERA Community
I created the following :
[Flags()]
enum IA32_THERM_STATUS
{
Reading_Valid = 2147483648
Resolution_in_Deg_Celsius = 2013265920
Digital_Readout = 4161536
Cross_domain_Limit_Log = 16384
Cross_domain_Limit_Status= 8192
Current_Limit_Log = 4096
Current_Limit_Status = 2048
Power_Limit_Notification_Log = 1024
Power_Limit_Notification_Status = 512
Thermal_Threshold_2_Log = 265
Thermal_Threshold_2_Status = 128
Thermal_Threshold_1_Log = 64
Thermal_Threshold_1_Status = 32
Critical_Temperature_Log = 16
Critical_Temperature_Status = 8
PROCHOT_or_FORCEPR_Log = 4
PROCHOT_or_FORCEPR_Event = 2
Thermal_Status_Log = 1
Thermal_Status = 0
}
$MSRHex = ((cmd /c C:\ProgramData\Util\PCM\pcm-msr.exe 0x19c 2>1 $null ) -match “Read Value”).split(" “)[3]
$MSRDec = [Convert]::ToInt64(”$MSRHex", 16)
[IA32_THERM_STATUS]$flags = $MSRDec
$flags
1St problem I have is I don’t know how to define the Resolution_in_Deg_Celsius and Digital_readout , values as they cover multiple positions here is how I arrived a the values : I’m not good in math but based on the example I found I have get the number for column B and for the items that span multiple rows I add the row and take the total.
to run my code, you can set the $MSRHex = 0x883d2800 and see if that converts.
I get errors. Not surprising as some of the value are simple flags but digital Readout and Resolution are going to values I want to capture and convert back to dec temp readings. No clue on how I should do this ?