|
Home > Archive > Unix Programming > July 2005 > Help needed regarding bandwidth calculation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Help needed regarding bandwidth calculation
|
|
| Farhan 2005-07-13, 6:02 pm |
| I have to know the available bandwidth of my lan/net connection
programmatically. Is there any way to know it? Please help. I am using
Red Hat Linux 9.0.
Note: I don't want to know the speed of my interface card rather the
speed of my internet connection.
| |
| Gordon Burditt 2005-07-13, 6:02 pm |
| >I have to know the available bandwidth of my lan/net connection
>programmatically. Is there any way to know it? Please help. I am using
>Red Hat Linux 9.0.
>
>Note: I don't want to know the speed of my interface card rather the
>speed of my internet connection.
Transfer something big and time it. Programs like "ftp" or "fetch"
are pretty good at transferring stuff. Then do the math. This
will measure the throughput between two points at a particular time.
Be aware the bottleneck isn't necessarily YOUR internet connection;
some web sites are run from permanently-dialed-up dialup lines,
ISDN lines, or slower DSL lines than what you might have. Also,
DSL lines tend to have slower UPload than DOWNload, so someone
running a web site from a DSL line may well have a much slower
UPload speed than your DOWNload speed, plus they may have many more
users than just you.
Gordon L. Burditt
| |
|
| Gordon Burditt wrote:[vbcol=seagreen]
If you are on Linux,you can use the /proc filesystem to gather the
data.The file /proc/net/dev can give you some other statistics apart
from the total number of packets received and transmitted.You can parse
this file to dynamically get the number of data transmitted and received
on a particular interface.
~HTH
|
|
|
|
|