Varma
Varma

Reputation: 781

How do I measure the upload and download bandwidth utilization per each process on windows xp/2003/2008 in realtime using C#?

How do I measure the upload and download bandwidth utilization per each process on windows xp/2003/2008 in realtime using C#?

Upvotes: 2

Views: 1349

Answers (1)

FWH
FWH

Reputation: 3223

Use one of these 2 libraries to capture packets :

http://www.codeproject.com/KB/cs/pacanal.aspx

or

http://www.codeproject.com/KB/cs/pktcap.aspx

. Then:

  • Capture all packets
  • For each packet, get the associated process
  • With the packet length and the current time, for each process, you'll be able to compute the bandwidth used.

In fact, once you manage to capture the packets, and associate them to a process, it's done. Then all you have to do is a bit of algebra.

There may be other solutions, but that's the only one I can think of right now.

Upvotes: 1

Related Questions