Hi All,
I'm writing some code that suppose to send UDP packets from one of the available network interfaces.
The logic I want to use is to send from the less "busy" interface.
I'm trying to figure out a way to monitor the outgoing throughput without using the perfrmance counters since finding out the IP to bind from the performance counter instance is not simple (if possible at all).
I can track what I send but I need to assume that other processes can send what ever they like.
Any idea?
Thanks!
Loading

Roei BarRank #1,271 · 1.4K reputationPosted Oct 11, 2009, 4:35 AM EDT
System.Diagnostics.PerformanceCounter performanceCounter1; performanceCounter1 = new System.Diagnostics.PerformanceCounter(); performanceCounter1.CategoryName = "Network Interface"; performanceCounter1.CounterName = "Bytes Sent/sec"; performanceCounter1.InstanceName = "3Com 3C920 Integrated Fast Ethernet Controller [3C905C-TX Compatible] - Packet Sc" + "heduler Miniport"; performanceCounter1.MachineName = "sha-lion-01"; MessageBox.Show(performanceCounter1.NextValue().ToString());Lior Ohana5 reputationPosted Oct 11, 2009, 9:37 AM EDT
Roei BarRank #1,271 · 1.4K reputationPosted Oct 11, 2009, 12:29 PM EDT
Lior Ohana5 reputationPosted Oct 11, 2009, 12:57 PM EDT