Acessing与.NET的netstat类似数据 [英] Acessing netstat-like data with .NET

查看:229
本文介绍了Acessing与.NET的netstat类似数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法从.NET框架内访问诸如丢弃的数据包数量的信息。我知道Win32_PerRawData和IP helper API。在此先感谢

I'd like to know if there is any way to access info like number of discarded packets from within .NET framework. I am aware of Win32_PerRawData and Ip Helper API. Thanks in advance

推荐答案

您可以使用PerformanceCounter类。运行的Perfmon.exe找出什么是提供您的计算机上。你应该有网络接口+收到的数据包丢弃每个例如你的网络适配器。

Your can use the PerformanceCounter class. Run Perfmon.exe to find out what's available on your machine. You should have Network Interface + Packets Received Discarded for each of your network adapters for example.

这篇关于Acessing与.NET的netstat类似数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆