473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Testing Bandwidth usage of an application

I have a program that I wrote that connects to a remote server and
recieves data at random intervals. I'd like to measure the bandwidth
usage of this program. What is the best way to do this? Should I write
something into the app that can do this... if so, are there any useful
libraries for this purpose? Or, should I maybe look into using a third
party application... if so, can anyone here recommend a good one?

With much respect,
Marcus

Jul 28 '05 #1
4 2681
Marcus wrote:
I have a program that I wrote that connects to a remote server and
recieves data at random intervals. I'd like to measure the bandwidth
usage of this program. What is the best way to do this? Should I write
something into the app that can do this... if so, are there any useful
libraries for this purpose? Or, should I maybe look into using a third
party application... if so, can anyone here recommend a good one?


Why don't you just count the bytes sent/received over the wire and
divide it on the time spent doing it?

Jul 29 '05 #2
This was exactly my question... how does one "count the bytes"? Is
there a specific library you could point me to?

Jul 29 '05 #3
Marcus sade:
This was exactly my question... how does one "count the bytes"? Is
there a specific library you could point me to?


With std::strlen =)

Sockets are pretty platform-dependent, but if you're using
unix function "read" then consult man-pages for its return value,

otherwise consult os-specific api documentation for similar return values.

Or get aquinted with what data you actually recieve.

Tobias
--
IMPORTANT: The contents of this email and attachments are confidential
and may be subject to legal privilege and/or protected by copyright.
Copying or communicating any part of it to others is prohibited and may
be unlawful.
Jul 29 '05 #4

Marcus wrote:
This was exactly my question... how does one "count the bytes"? Is
there a specific library you could point me to?


recv() returns you read byte count or -1 on error. You recv(), don't
you?

Jul 29 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: FLEB | last post by:
Is there a way to check my site's bandwidth usage via PHP? I'd like to "gracefully bail" if I start to get near my host's limit. Its running on a shared Linux box, on Apache 1.3.31 and PHP v4.3.3...
0
by: Martin Raychev | last post by:
Hi everybody, I have a need for a web app that will allow a flash client to download files at a specified speed. I am using Flash for an application of mine which downloads JPG slides to...
9
by: Chibi | last post by:
I'm writing an application that's bandwidth intense. My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more. The application I am writing right now...
3
by: Raj | last post by:
is it possible using C# dotnet to control the bandwidth usage means the transfer rate of download and upload? Thanks!
1
by: Richard | last post by:
Our client's web app will require (or at least recommend) that users have broadband connection. Other than the myriad of web sites that one can go to test bandwidth, are there any custom controls...
0
by: brett | last post by:
My shared hosting service provides statistics on bandwidth usage once/mo. I need to track bytes transferred on a daily basis. Is there something I can do in ASP.NET 2.0 for getting bandwidth...
0
by: rn5a | last post by:
In a ASP.NET application, users can upload files from their hard disk to the server. Users can also create new files & directories directly on the server, rename them, delete them, edit the files...
8
by: FrobinRobin | last post by:
Hi, I intend to use Ajax for a kiosk application, it's primary usage is to retrieve live data from my DB, it's a fairly small amount of data (5 fields, of small data size and limited to 15...
24
by: David | last post by:
Hi list. What strategies do you use to ensure correctness of new code? Specifically, if you've just written 100 new lines of Python code, then: 1) How do you test the new code? 2) How do...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.