Monitor a process's network usage?

前端 未结 4 526
小鲜肉
小鲜肉 2020-11-28 10:13

Is there a way in C# or C/C++ & Win32 to monitor a certain process\'s network usage (Without that application being built by you obviously)? I would like to monitor just

相关标签:
4条回答
  • 2020-11-28 10:34

    I asked the same question on MSDN forum and get answer. Frankly speaking have tried it. I.e. tried but not so hard)) It was suggested to use ETW. I did not realize how to consume ETW events properly. http://social.msdn.microsoft.com/Forums/en-US/perfmon/thread/b82da95a-1c18-49ce-9bfa-e3d79ec40907

    0 讨论(0)
  • 2020-11-28 10:37

    You could use WinPcap for this or write your own device driver. I don't think there are any per process perfmon counters you can leverage.

    0 讨论(0)
  • 2020-11-28 10:45

    It's possible, but if I'm not mistaken you'll have to create a network driver to filter all network traffic and than figure out which process created the traffic.

    Microsoft has an free application for it called Microsoft Network Monitor 3.2 (download). According to the release notes it also has an api to use.

    Network Monitor API: Create your own applications that capture, parse and analyze network traffic!

    Here is a blog post about these API's.

    In my opinion you should use this API (or another API such as WinPcap) to filter the traffic instead of writing your own device driver.

    0 讨论(0)
  • 2020-11-28 10:53

    NetLimiter 2 Limiter

    Network Traffic Monitor You can get the last freeware version from here

    0 讨论(0)
提交回复
热议问题