【发布时间】:2013-03-13 02:51:37
【问题描述】:
有什么方法可以使用性能计数器来监控所有流量,但在特定端口?
我在做:
GetCounterValue(_netRecvCounters[index], "Network Interface", "Bytes Received/sec", _instanceNames[index]):
double GetCounterValue(PerformanceCounter pc, string categoryName, string counterName, string instanceName)
{
pc.CategoryName = categoryName;
pc.CounterName = counterName;
pc.InstanceName = instanceName;
return pc.NextValue();
}
但它似乎记录了所有内容
【问题讨论】:
标签: c# performancecounter