title: How to get network usage of certain proccess in .Net?
body: <p>I'm trying to get cpu, ram and network usage (like bytes sent per second or total bytes/s) of certain services.</p>
  <p>I can get cpu counter like this:</p>
  <pre><code>PerformanceCounterCategory processCategory = PerformanceCounterCategory.GetCategories().FirstOrDefault(x =&gt; x.CategoryName == &quot;Process&quot;);
  var counter = processCategory.GetCounters(serviceName).FirstOrDefault(x =&gt; x.CounterName == &quot;% Processor Time&quot;);
  </code></pre>
  <p>From this counter i can get the cpu usage.
  I can do the same thing for memory.</p>
  <p>How to do the same for the network?
  If i can't do it in similar way, how should I do it instead?</p>