We help IT Professionals succeed at work.

How to find the no of PROC CORES in a Windows Server

1,251 Views
Last Modified: 2013-12-13
I want to find the no of cores available on the server. Is tehre a way to do this without 3rd party tools?

System info gives only the processor information as below
Processor      x86 Family 15 Model 4 Stepping 3 GenuineIntel ~2793 Mhz
Processor      x86 Family 15 Model 4 Stepping 3 GenuineIntel ~2793 Mhz
Processor      x86 Family 15 Model 4 Stepping 3 GenuineIntel ~2793 Mhz
Processor      x86 Family 15 Model 4 Stepping 3 GenuineIntel ~2793 Mhz
Comment
Watch Question

Top Expert 2010
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Brian PiercePhotographer
CERTIFIED EXPERT
Awarded 2007
Top Expert 2008

Commented:
do a CTRL-ALT-DEL and go to task manager. Select the Performace tab, In CPU Usage History you should see one or more little graphs one for each processor

Author

Commented:
Task Manager gives the no of processors and I cant install any 3rd party tools.
Does anyone know the parameter in WMI to find the no of cores?
Top Expert 2010

Commented:
start > run > cmd

wmic cpu get NumberOfCores

thanks
Top Expert 2010
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Brian PiercePhotographer
CERTIFIED EXPERT
Awarded 2007
Top Expert 2008

Commented:
Task manager actually shows one graph for each processor core
Brian PiercePhotographer
CERTIFIED EXPERT
Awarded 2007
Top Expert 2008

Commented:
... see this - from my single processor 2 core machine


cores.jpg

Author

Commented:
KCTS: The task manager shows the hyper threaded CPU's.
My laptop has 1 Processof and two cores and the attached is what it shows

The attached code works on my laptop (win 7 x64)  but not on the server. Aaarrrgg
SunnyC7 thanks for the code. It works on my laptop too but not on the server (win2k3 Std SP2)...
 Oh boy why is this so frustrating?
 

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings 
    Wscript.Echo "System Name: " & objComputer.Name
    Wscript.Echo "Number of Processors: " & _
        objComputer.NumberOfProcessors
Next


Set colItems = objWMIService.ExecQuery(_
    "Select * from Win32_Processor")
For Each objItem in colItems
    Wscript.Echo "No of Cores: " _
        & objItem.NumberOfCores
Next

Open in new window

TM.jpg

Author

Commented:
Provides partial answer
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.