LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-16-2011, 02:33 PM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,391
Blog Entries: 1

Rep: Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109
Quick and easy way to measure throughput between two nodes


I was in a situation earlier, where I was not allowed to install software on any servers, but I was expected to fix a networking problem that required me to test the throughput between two nodes on different networks.

Generally, at this point I would use 'iperf' but, being unable to install anything, I was unable to.

So I had to get around this somehow. Here is a simple solution for anyone caught in the same spot.

Code:
cat /dev/zero | pv | ssh 13.4.14.29 "cat > /dev/null"
 
Old 03-16-2011, 04:49 PM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 249Reputation: 249Reputation: 249
Hey, that looks pretty handy! I've never heard of pv up till now.

As I don't run fedora myself (and this isn't in the CentOS repositorys I'm used to frolicing in), I'm linking here;
This is "pipe viewer" (homepage here). Current version is 1.2.0, and it seems pretty flexible, too.

Last edited by xeleema; 03-16-2011 at 04:52 PM.
 
Old 03-16-2011, 04:54 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,391
Blog Entries: 1

Original Poster
Rep: Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109
Quote:
Originally Posted by xeleema View Post
Hey, that looks pretty handy! I've never heard of pv up till now.

For anyone else wondering what that is, it's "pipe viewer" (homepage here). Looks like a handy little bugger.
Very. With a little imagination it can become a very neat tool.

For example: copying a file with progress...
Code:
pv somefile.txt > /location/somefile.txt
Drive Read test
Code:
pv /dev/zero > /dev/null
Zipping a file with progress

Code:
pv some_file_to_compress.txt | gzip > file_compressed.gz
Copy a file over an SSH tunnel with progress

Code:
pv output.dat | gzip | ssh -p 22 root@3.2.12.12 "cat > /backups/dir/output.tar.gz"
Import a SQL backup with progress (Awesome IMHO)

Code:
pv db.sql | mysql database_name

Last edited by szboardstretcher; 03-16-2011 at 05:09 PM.
 
Old 03-19-2011, 10:59 AM   #4
markfox
LQ Newbie
 
Registered: Jul 2010
Posts: 19

Rep: Reputation: 1
pv is a great find. Thanks for mentioning it.

But be aware that on fast local networks (ie. anything Gigabit), your CPU may be the bottleneck in anything involving SSH. For example, my little Atom based CPU can only churn through data at about 20MB/s if SSH is involved.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inquiry:How to measure data throughput of the frame raley link of an Linux server? hadimotamedi Linux - Newbie 1 11-09-2009 07:34 AM
Software to measure throughput jeejasmin Linux - Software 0 04-03-2008 03:35 PM
quick easy question AmphetaminePhreak Linux - Newbie 4 07-26-2006 09:47 PM
quick easy question alexr186 Linux - Networking 3 11-02-2003 09:48 AM
Quick and easy answer please Jimbo Mahoney Linux - General 4 11-20-2001 03:44 PM


All times are GMT -5. The time now is 11:29 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