LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-14-2009, 06:51 AM   #1
KaLPo
LQ Newbie
 
Registered: May 2009
Location: Edinburgh
Distribution: Arch / Ubuntu / Sci Linux
Posts: 13

Rep: Reputation: 0
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??
 
Old 05-14-2009, 07:23 AM   #2
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31
Blog Entries: 5

Rep: Reputation: 16
This only has to be for the Linux platform correct?
 
Old 05-14-2009, 08:42 AM   #3
KaLPo
LQ Newbie
 
Registered: May 2009
Location: Edinburgh
Distribution: Arch / Ubuntu / Sci Linux
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 05-14-2009, 08:53 AM   #4
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31
Blog Entries: 5

Rep: Reputation: 16
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!

Last edited by senseproof; 05-14-2009 at 09:14 AM. Reason: Deleted attachment because it wasn't what he wanted
 
Old 05-14-2009, 09:03 AM   #5
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 388
Blog Entries: 9

Rep: Reputation: 88
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 !

Last edited by pierre2; 05-14-2009 at 09:04 AM.
 
Old 05-14-2009, 09:08 AM   #6
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31
Blog Entries: 5

Rep: Reputation: 16
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.
 
Old 05-14-2009, 10:52 AM   #7
KaLPo
LQ Newbie
 
Registered: May 2009
Location: Edinburgh
Distribution: Arch / Ubuntu / Sci Linux
Posts: 13

Original Poster
Rep: Reputation: 0
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!
 
  


Reply

Tags
internet, isp, speed



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Connection Speed sucram2g Linux - Networking 4 04-21-2010 09:23 PM
slow internet connection speed 666 Mandriva 12 09-24-2005 09:54 AM
calculating download time/speed juanb Linux - Networking 4 03-19-2004 02:49 PM
Real internet connection? contact Linux - Networking 2 12-05-2003 11:16 PM
Is there a tool to monitor Internet connection speed and also network speed? xleft4dexy Linux - Networking 4 10-14-2003 10:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration