If you want to get the number of physical CPU cores, execute the following command:
for /F "tokens=2 delims==" %C in ('wmic cpu get NumberOfCores /value ^| findstr NumberOfCores') do @echo %C
If you want to get the number of logical CPU processors, execute the following command:
for /F "tokens=2 delims==" %C in ('wmic cpu get NumberOfLogicalProcessors /value ^| findstr NumberOfLogicalProcessors') do @echo %C
If the ratio of the above 2 numbers is 1/2, it means your CPU supports HyperThreading.
Add new comment