Avatar of JaveedShaik
JaveedShaik
Flag for United States of America asked on

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

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
ProgrammingExchangeWindows Server 2003

Avatar of undefined
Last Comment
JaveedShaik

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
sunnyc7

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Brian Pierce

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
JaveedShaik

ASKER
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?
sunnyc7

start > run > cmd

wmic cpu get NumberOfCores

thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
sunnyc7

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Brian Pierce

Task manager actually shows one graph for each processor core
Brian Pierce

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


cores.jpg
JaveedShaik

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
JaveedShaik

ASKER
Provides partial answer