Friday, May 25, 2012

How to find number of processor cores?

Processors come in different flavors suck as dual core quad core etc. It is difficult to figure out how many core CPUs are installed on the machine. So here are some of the ways to find number of CPU cores.

If you have SQL Server installed on the machine then there is a system procedure available to find out the processor cores.

exec master.dbo.xp_msver processorCount

For more details checkout this link

If SQL server is not available on the machine then you can check in registry under following entry


Each core will have a separate entry under CentralProcessor so based on number of entries you can find number of cores.

You can also compare it with another registry entry under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\NUMBER_OF_PROCESSORS

Microsoft also provides a command line utility for getting server information. It is called CoreInfo and more details are available here

On command line you can use following and see the output in coreinfo.txt

coreinfo.exe > coreinfo.txt

No comments:

Post a Comment