LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 03-24-2008, 11:55 AM   #1
vonedaddy
Member
 
Registered: Aug 2004
Location: Philadelphia,PA
Posts: 177

Rep: Reputation: 17
Command Line Bandwidth test?


This may be a stupid question, BUT...

Is there anyway to test bandwidth via command line? I have the need to verify bandwidth for remote locations but only have ssh access.
 
Old 03-24-2008, 01:24 PM   #2
rvca
LQ Newbie
 
Registered: Dec 2005
Location: Vancouver
Distribution: Debian/Ubuntu
Posts: 28

Rep: Reputation: 15
ethstatus?

Hi,

Maybe you are looking for something like this:

ethstatus

http://www.penguin-soft.com/penguin/...ethstatus.html

Cheers,
 
Old 03-24-2008, 02:05 PM   #3
vonedaddy
Member
 
Registered: Aug 2004
Location: Philadelphia,PA
Posts: 177

Original Poster
Rep: Reputation: 17
This looks like more of a network (LAN) interface monitoring tool. I am concerned with bandwidth to the internet and back (upload and download speeds).

Thanks
 
Old 03-24-2008, 02:21 PM   #4
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
We've figured that with a 'test' file. Create a file which is representative (we used a 1/2 gig file and a 1 gig file) and transfer it back and forth between the sites in question. You could use SCP or FTP to transfer the files and simply use the time command or your watch to time the transfer. This worked for us to decide on the quickest way to transfer large files.
Hope this helps.
 
Old 02-11-2009, 11:01 AM   #5
rozz
LQ Newbie
 
Registered: Jan 2005
Location: Beirut - Lebanon
Distribution: Fedora
Posts: 18

Rep: Reputation: 0
For testing internet bandwidth (ie "slow" traffic), you can use tethereal, like that
tethereal eth1 -z conv,tcp
Wait for like 10 seconds, then hit ctrl-c, and you will get statistics about the amount of packets transferred... you might need to add up some numbers, then divide by the capture time
I know... ugly.. but hey, this is linux.
You could use time on the command, but remember that tethereal takes about a couple of seconds to start capturing, so that might not be very efficient.

For faster transfers, tethereal will start dropping packets. (check near the bottom, it says something like 151231 packets dropped if this happens. In this case the bandwidth measurement is not correct.

In this case you might want to use the method below:

For testing "pure" network performance (ie without considering the disk drive performance), you can do that.
Firs you will need a ram filesystem. I am running Knoppix now, so the /tmp/ directory is actually mounted in ram
go to one machine (receiving machine) and type

nc -l -p 12345 > /tmp/bwtest


then on the sending machine

time dd if=/dev/zero | nc 1.1.1.1 12345

(1.1.1.1 being the ip of the receiving machine)

wait for half a minute or so, then hit ctrl-c on the sending machine.
Now you have the time of transfer (real)
You can go on the receiving machine and type

ls -lh /tmp/bwtest

And you will get the amount of data received. Divide that by the time, and you get the bandwidth...

On a 100mbps eth crossover link between 2 machines running knoppix, i got 10 megabytes / second.

All the methods above use tools that are usually bundled with the OS.

Alternatively, there is a linux command line tool called iperf which may also provide bandwidth measurements.

Last edited by rozz; 02-11-2009 at 11:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
howto print a test page from command line ? cccc Debian 1 05-18-2007 06:46 AM
command-line speed test zmeda Linux - Networking 2 07-10-2006 08:13 AM
how can i test bandwidth? yenonn Linux - Networking 1 04-15-2005 03:06 AM
Test internet bandwidth tangle Linux - Networking 1 04-13-2005 04:10 PM
bandwidth test arlothemoo General 0 12-13-2002 07:38 PM


All times are GMT -5. The time now is 06:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration