Jul 4, 2007 #1 woogoo Programmer Feb 14, 2004 247 GB Hi does anyone know how to detect the number of processors and cores on a machine? I'd appreciate any comments on this.
Hi does anyone know how to detect the number of processors and cores on a machine? I'd appreciate any comments on this.
Jul 4, 2007 #2 ca8msm Programmer May 9, 2002 11,327 GB To get the number of processors, you can use [tt]System.Environment.ProcessorCount[/tt] but I think it's slightly more tricky for cores. ____________________________________________________________ Mark, [URL unfurl="true"]http://aspnetlibrary.com[/url] Need help finding an answer? Try the Search Facility or read FAQ222-2244. Upvote 0 Downvote
To get the number of processors, you can use [tt]System.Environment.ProcessorCount[/tt] but I think it's slightly more tricky for cores. ____________________________________________________________ Mark, [URL unfurl="true"]http://aspnetlibrary.com[/url] Need help finding an answer? Try the Search Facility or read FAQ222-2244.
Jul 4, 2007 #3 computerjin Programmer Jan 13, 2001 179 PK Try looking at Win32_Processor and WIn32_ComputerSystem classes in WMI. System.Management namespace is used in .NET to access WMI functions. Using WMI, you can get much more information about software, hardware, environemnt, networking etc easily and efficiently. Hope it helps. Upvote 0 Downvote
Try looking at Win32_Processor and WIn32_ComputerSystem classes in WMI. System.Management namespace is used in .NET to access WMI functions. Using WMI, you can get much more information about software, hardware, environemnt, networking etc easily and efficiently. Hope it helps.
Jul 4, 2007 #4 SHelton Programmer Jun 10, 2003 541 GB ca8msm is right, ProcessorCount returns 2 on my dual core machine, and 4 on a dual processor (each a dual core) server. Upvote 0 Downvote
ca8msm is right, ProcessorCount returns 2 on my dual core machine, and 4 on a dual processor (each a dual core) server.