Wednesday, April 13, 2016

Problem: How many processors, cores, logical processors (Hyper Threading) are running on your workstation ?

Windows "Computer > Properties" and Task Managers is misleading.


Computer > Properties will show 2 CPU when only 1 CPU running on this workstation.
Task Manager will show 8 CPU or Cores.

Solution: 


There are two ways to check for CPU, Cores, and  Hyper Threading.

Download [ CPU-ID ]

If you need to check large number of windows devices then deploy the following VBA or MS-DOS script.


VBA Script



       
strComputer = "." 
strResult = ""
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_ComputerSystem",,48) 
For Each objItem in colItems 
    strResult= strResult & "NumberOfProcessors: " & objItem.NumberOfProcessors & vbcrlf
Next


Set objWMIService2 = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService2.ExecQuery( _
    "SELECT * FROM Win32_Processor",,48) 
For Each objItem in colItems 
    strResult= strResult & "NumberOfCores: " & objItem.NumberOfCores & vbcrlf
    strResult= strResult & "NumberOfLogicalProcessors: " & objItem.NumberOfLogicalProcessors & vbcrlf
Next

    Wscript.Echo strResult

The script revels the workstation has 1 CPU, 4 cores, with 8 logic processors (Hyper Threading).



MS-DOS Script


       
echo wmic cpu get NumberOfCores, NumberOfLogicalProcessors


The script revels the workstation has 4 cores with 8 logic processors.



No comments:

Post a Comment