How can I correctly identify physical, hyperthreaded, and multicore processors in Windows* Server 2003 and XP?
Correctly identifying the number and type of processors on Windows Server 2003 and XP computers has been difficult at best. Inventory for Windows can easily identify the number of physical or logical processors but has difficulty with logical and multicore processors. This issue is not limited to Altiris Inventory Solution.
Until Windows Vista was released, the various Windows operating systems were unable to identify the number of physical, logical, and multicore processors.
Windows Vista added the following new properties to WMI that provide for:
Even though Inventory for Windows provides a "cores" attribute in the inv_aex_hw_cpu table and hardware, inventory will attempt to correctly populate this column. However, processor information is still not complete.
Server 2003 and XP do not have the above properties in WMI by default. Microsoft has created two hotfixes that update WMI on these operating systems with one per operating system. These hotfixes are available only by request from Microsoft and can be found at the following locations
Custom Inventory can be implemented to capture the correct processor information as provided by the above properties.
Microsoft provides the following information regarding these hotfixes:WMI properties before applying the hotfix
To determine whether hyperthreading is enabled for the processor, compare the value of the NumberOfCores property to the value of the NumberOfLogicalProcessors property. If hyperthreading is enabled in the BIOS for the processor, the value of the NumberOfCores property is less than the value of the NumberOfLogicalProcessors property.
For example, assume that a dual-processor system contains two processors that are each enabled for hyperthreading. This system can run four threads or four programs at the same time. In this case, the value of the NumberOfCores property is 2, and the value of the NumberOfLogicalProcessors property is 4.
Custom Inventory to Capture the New WMI Properties
The following custom inventory will capture these new WMI properties. These are just segments. The accompanying .zip file contains the complete source XML files.
The following custom inventory will query the "numberofcores" from the win32_processor class and set a variable with that value. Even though there may be multiple rows, the value for each row would be the same. It then queries the win32_computersystem class and gathers the 'numberofprocessors' and 'numberoflogicalprocessors'. It will populate one row in the table per computer resource.
<%foreach wmiobject="o" namespace="root\CIMV2" wql="SELECT * FROM Win32_processor" %>
<%set numberofcores = "wmi:o.numberofcores" %>
<%foreach wmiobject="o" namespace="root\CIMV2" wql="SELECT * FROM Win32_ComputerSystem" %>
c0 ="<%writexml "%numberofcores%"%>"
c1 ="<%writexml "wmi:o.NumberOfProcessors"%>"
c2 ="<%writexml "wmi:o.NumberOfLogicalProcessors"%>"
This custom inventory will query only the win32_processor class and return various CPU-related information plus the number of cores and the number of logical processors. It will return one row for each physical processor on the computer resource. By creating a report that counts the number of rows, the counts of physical processors, cores and logical processors can be determined.
<%foreach wmiobject="o" namespace="root\CIMV2" wql="SELECT * FROM Win32_Processor" %>
c1 ="<%writexml "wmi:o.Description"%>"
c2 ="<%writexml "wmi:o.Manufacturer"%>"
c3 ="<%writexml "wmi:o.Name"%>"
c4 ="<%writexml "wmi:o.NumberOfCores"%>"
c5 ="<%writexml "wmi:o.NumberOfLogicalProcessors"%>"