2

How can I get the network utilization using C# code?

Carlo
  • 25,602
  • 32
  • 128
  • 176
Sauron
  • 16,668
  • 41
  • 122
  • 174

2 Answers2

6

You can get some measurements using Windows Management Instrumentation (WMI) calls.

Here are a couple of tutorials:

Ben Griswold
  • 17,793
  • 14
  • 58
  • 60
1

You can calculate the network utilization from PerformanceCounters.

See How to Calculate Network Utilization in .NET

General Grievance
  • 4,555
  • 31
  • 31
  • 45
bashmohandes
  • 2,356
  • 1
  • 16
  • 23