LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Calculating the real internet connection speed (https://www.linuxquestions.org/questions/programming-9/calculating-the-real-internet-connection-speed-725911/)

KaLPo 05-14-2009 06:51 AM

Calculating the real internet connection speed
 
Hi there!!

I have been working for a wile in a JAVA program which calculates the real internet connection speed. i.e. If you have contracted an Internet connection with a particular ISP who offers you up to 20 mb, I want to test how much of this 20 mb I have.

I have been trying to just download a file, silly me, but obviously the speed I have got from that is the particular speed of this download, in my case ~150 kbs. I have tried to download lots of files and, becouse each downloads at 150, calculate how the velocity variates and there must be any way but I have not got it.


Does any one know How can I do it??

senseproof 05-14-2009 07:23 AM

This only has to be for the Linux platform correct?

KaLPo 05-14-2009 08:42 AM

I don't really care, I obviously prefer it to be multi-platform but, as it is just for me to practice my JAVA, It will be all right to be exclusive for linux.

senseproof 05-14-2009 08:53 AM

I don't really understand what you want so I made this python program that monitors the bandwidth usage average until you stop it. You can probably work out from that what you need to do in Java. It reads the statistics from the Linux sysfs, just download a big file from a fast host and it will give you an accurate reading...

If that's not what you want then I don't know!

pierre2 05-14-2009 09:03 AM

I was told ( by some Guru) that you download a file or something,
note the actual download speed ( eg : ~150Kb/s ) & multiply that by 8.
( 150Kb/s X 8 = 1.2Mb )( which is about what, my isp supplied 7.2Mb 3g modem does).
so that thing is certainly *not* supplying what I am paying for !

senseproof 05-14-2009 09:08 AM

The guru means to convert from bytes per second to bits per second you multiply by 8. ISPs usually give speeds in bits rather than bytes per second (largely because the numbers are bigger so it looks better for marketing).

The speed you get when downloading depends on so many other factors outside your control such as the remote hosts saturation and speed, the saturation and speed of the routers in between you and your destination.

I notice you're in Perth. For a decent speed test, you need to find a fast host in Perth. Try a university there and download an ISO from it. That will give you a more accurate result.

KaLPo 05-14-2009 10:52 AM

That is quite useful, so, if I want to know what speed is the ISP given I need to consider what I download.

I want to make something similar to one of those internet speed test in flash which are in internet, like this http://www.speedtest.net/, My aim (besides learning) is to make a little application for testing my internet service and use it as proof of it for future complains. xDDDDD

So, If I download some little document from a good server, like the ones owned by universities, and I calculate the speed in bites, what I obtain is the approximated real speed. Isnt it?

I am going to do some testing. Let see.


Thank you!


All times are GMT -5. The time now is 09:43 AM.