CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2008
    Posts
    38

    download speed monitor accuracy

    Hey guys. At the moment I'm working on a program that can give a read out of the speed of any downloads. The method that seemed simplest was to use the Winpcap libraries in statistical mode, set the filter accordingly and away we go. I first concentrated on trying to monitor the speeds of downloads using uTorrent. In the pcap_filter i set the appropriate port to monitor and it all works fine.

    However the results I'm getting aren't especially accurate when compared to the actual download speeds given by uTorrent itself. Call me dumbass but when I convert from Bits per sec to Kilobytes per sec, should I be dividing by 8 then a thousand? or dividing by 8 then dividing by 1024. Either way i doubt very much whether that is the answer to my problems seeing how it tends to be out by about 100 or so at download speeds of between 600-800 kbs.

    Is there any better way of monitoring network traffic, I mean I was pretty happy with the simplicity of the pcap libraries, until I found the results were off. Even smoothing out the peaks with a running average doesn't do much to bring the results more in line with those given by uTorrent.

    Anyone with any suggestions or feedback? Ps I wasn't sure whether this should be in the networking section or this, opted for this cos it seems like more people come here Would really appreciate any thoughts on this....... cheers
    Last edited by Cheezewizz; December 21st, 2009 at 09:32 AM.

  2. #2
    Join Date
    Apr 2008
    Posts
    725

    Re: download speed monitor

    1000 or 1024 is not particularly consistent across the board. If it's a number you're seeing, it's your choice - I would prefer to see KiBs, so I would go for 1024.

  3. #3
    Join Date
    Jan 2009
    Posts
    1,689

    Re: download speed monitor accuracy

    Quote Originally Posted by Cheezewizz View Post
    Is there any better way of monitoring network traffic
    Fiddler: http://www.fiddler2.com/fiddler2/

    I don't know how I lived without it

  4. #4
    Join Date
    May 2008
    Posts
    38

    Re: download speed monitor

    thanks for the suggestions guys. Looks like might have to adapt my app a bit to C# to make use of fiddler class libraries but meh, needs must ....... I'll have to look into that further. I appreciate the responses, thanks again

  5. #5
    Join Date
    Jan 2009
    Posts
    1,689

    Re: download speed monitor

    Oh, fiddler isn't an API, it's a program that runs along side your web-based stuff and listens on the proxy 8888.

  6. #6
    Join Date
    May 2008
    Posts
    38

    Re: download speed monitor

    I think there's some useful functionality there deffo, will have to check it out when I get in from work. There's something you can integrate into your own (.NET) apps too http://fiddler.wikidot.com/fiddlercore-api.
    still gonna persevere a bit more with the code i already have and try and bring the speed given more in line with uTorrents. Descrepancies only seem to appear when monitoring torrent traffic anyhow ......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured