3

Trying to find a way to get PowerShell to output the number of P and E cores on my 12th gen device. Getting the number of cores and number of logical cores is fine but I've got no way of being able to differentiate those types of cores from each other.

I've tried ways such as looking into retrieving the different clock speeds of both types of cores but got nowhere.

New to PowerShell any help would be appreciated.

16BitBlank
  • 41
  • 4
  • 1
    I don't have a 12th Gen to test but I suspect you can use the `Get-CimInstance` command to collect this info. `Get-CimInstance -ComputerName localhost -Class CIM_Processor | Select-Object *` will collect all of the processor info. You can then drill in further by using dot notation. My bet is the P&E cores will be spelled out in the **CimInstanceProperties**, try looking in the results from this: `(Get-CimInstance -Class CIM_Processor | Select-Object *).CimInstanceProperties`. – DBADon Aug 31 '22 at 19:15
  • 1
    Thank you for the suggestion! Had a go this morning using the command and no dice I'm afraid. While it did produce some useful information like number of enabledCores, it still grouped both P&E into physicalCores. – 16BitBlank Sep 01 '22 at 11:02
  • The [coreinfo](https://learn.microsoft.com/en-us/sysinternals/downloads/coreinfo) gives the correct output in my i7-12700, although it is not the shell command. It uses `GetLogicalProcessorInformation` function actually. – moep0 Oct 08 '22 at 02:31

1 Answers1

0

Running on a [12th Gen Intel(R) Core(TM) i7-12800H], this gives me the count:

wmic cpu get Name,NumberOfCores,NumberOfEnabledCore,NumberOfLogicalProcessors

Code Sample

NumberOfLogicalProcessors-NumberOfEnabledCore=Pcores
NumberOfLogicalProcessors-(Pcores*2)=Ecores
phuclv
  • 37,963
  • 15
  • 156
  • 475
yup
  • 1
  • 2
    Apparently Alder Lake Celeron is 2c2t with just two P-cores without hyperthreading. https://en.wikipedia.org/wiki/Alder_Lake#List_of_12th_generation_Alder_Lake_processors . So the formula would incorrectly calculate 0 P cores. Or there's a mobile Alder Lake with one non-HT P-core, 4 E-cores, so 5c5t. But so far, only ADL Celerons have had HT disabled on the P cores. Of course someone could presumably do that in the BIOS of any ADL system. But absent more specific CPUID data, this might work in enough cases to be useful for some purposes. – Peter Cordes Oct 24 '22 at 00:55