title: Monitor network performance for a specific process
body: <p>I'm writing a program that uses the .NET performance counter to get CPU, Memory and Network usage for a specific process.</p>
  
  <p>For example, to get the CPU and Memory data for <code>Explorer</code>, I create performance counters like this:</p>
  
  <pre><code>PerformanceCounter PC = new PerformanceCounter();
  PC.CategoryName = "Process";
  PC.CounterName = "% Processor Time";
  PC.InstanceName = "Explorer";
  
  PerformanceCounter PC = new PerformanceCounter();
  PC.CategoryName = "Process";
  PC.CounterName = "Working Set - Private";
  PC.InstanceName = "Explorer";
  </code></pre>
  
  <p>Unfortunately, there is no property for the Process <code>categoryName</code> that allows me to get network usage for that process. I can use the Network Interface <code>categoryName</code> to get overall network usage on any particular NIC, but cannot isolate it to any given Process. </p>