2
有什么方法可以使用性能计数器来监视所有流量,但是在特定的端口?使用性能计数器监视特定端口
我做:
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();
}
但似乎一切都记录
我该怎么做,没有性能计数器?有没有其他方法? – 2013-03-12 21:14:31