Some thoughts on retrieving CPU socket, core and hyperthreading data

(imported topic written by RolfWilhelm)

Dear all,

I had some days ago the issue to retrieve information about the number of CPU sockets and number of cores in a server. Goal was to check if Windows Server Enterprise Edition is installed on hardware, which requires this license or not or vice versa to see if a Windows Server Standard Edition is installed on a hardware which requires Enterprise Edition.

I found the relevance clauses “physical processor count” and “number of processors”, but found them not working properly at least on Windows Server 2012 and 2008R2 - while Powershell and Taskmanager were showing 4 sockets, 6 cores per socket and hyperthreading enabled, TEM showed “3 physical processors” (instead of 4) and “30 processors” (instead of 48). And I was still not able to detect the number of real cores independantly of hyperthreading. Used version is TEM 8.2 with agent version 8.2.1409 - if somebody can confirm that this has been solved in v9 or not will be appreciated.

So, here is now a working solution based on WMI, which takes some time, but delivers correct data:


if Windows of Operating system then (String value of (select “NumberOfProcessors from Win32_ComputerSystem” of wmi)) else (number of processors) as string


if Windows of Operating system then ((integer value of (select “NumberOfCores from Win32_Processor where DeviceID=‘CPU0’” of wmi)) * (integer value of (select “NumberOfProcessors from Win32_ComputerSystem” of wmi))) as string else (number of processors) as string


if Windows of Operating system then if ((integer value of (select “NumberOfCores from Win32_Processor where DeviceID=‘CPU0’” of wmi))=(integer value of (select “NumberOfLogicalProcessors from Win32_Processor where DeviceID=‘CPU0’” of wmi))) then “No” else “Yes” else “”

Due to the fact that using WMI always costs a lot of CPU performance and that HW does not change that often, but in case you perform an upgrade you also want to see the result not too far in the future, I have set the refresh period to 1 day.



(imported comment written by jgstew)

See the “cpupackage” inspector

Example Analysis here:

(imported comment written by RolfWilhelm)

Thanks for this. Looks much faster as my WMI code.

With the hint about “cpupackage” (I did not had any references in the last version of the inspector document I have) I also found this one:

Counting RVUs
(which is basically the same)

Any experience on how this behaves on non Windows platforms? My focus is Windows, but it could be useful also on other platforms exactly for the purpose of counting RVUs.

(imported comment written by jgstew)

cpupackage works cross platform, but I have not thoroughly checked if it reports back the correct data.

One exception is the “smt capable” property, which does not appear to work on the Mac at all.

(imported comment written by RolfWilhelm)

I am asking, because I am getting on some Solaris machines a value of 1033 for the number of cores, but the native inspector does the job here (“number of processors”)

(imported comment written by jgstew)

Sounds like a bug, but I believe it is supposed to be cross platform.