title: WMI query - CPU LoadPercentage
body: <p>I´m searching for a better way to get the CPU load in percent with WMI from multiple systems(means different CPUs etc.).
  My code is working, but I think there is a better way to get over all CPU usage in percent.</p>
  
  <p>Any ideas?</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code>SelectQuery queryCpuUsage = new SelectQuery("SELECT * FROM Win32_Processor");
  ManagementObjectSearcher cpuUsage = new ManagementObjectSearcher(scope, queryCpuUsage);                                       
  ManagementObjectCollection cpuUsageCollection = cpuUsage.Get();                                                       
  
  foreach (ManagementObject queryObj in cpuUsageCollection)
  {                                           
  iCPU++;
  calcCPU = Convert.ToInt32(queryObj["LoadPercentage"]);
  perCPU = perCPU + calcCPU;
  }
  
  perCPU = perCPU / iCPU;
  
  cpuUsageCollection.Dispose();
  
  Console.WriteLine("LoadPercentage CPU: {0}", perCPU);
  </code></pre>