Archived

This topic is now archived and is closed to further replies.

Monitoring available bandwidth

This topic is 5318 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know a way of monitoring the bandwidth available to an application so that it can react to changes in it, i.e. when the user downloads a file in the background, your app will have it''s bandwidth squeezed.

Share this post


Link to post
Share on other sites
If you''re working with Win32, you can use WMI. It''s COM accessible, so you can just query the bandwidth. I would probably use

Win32_PerfRawData_Tcpip_Networkinterface
- BytesSentPerSec
- BytesReceivedPerSec

Since it''s a raw counter, you can query it at 30 second or 60 second intervals and calculate the average bandwidth used / second over the last interval and see how close that is to 10 or 100 Mbs depending on your interface speed.

You''ll have to look up the formula, it''s on the WMI page.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_start_page.asp

Interim

Share this post


Link to post
Share on other sites