I recommend that you use lftp command to test Internet upload and download speed from console. You can run lftp using the ssh client:
[a] wget - Retrieves files from the web (download speed test).
[b] wput - A tiny wget-like ftp-client for uploading files (upload speed test).
[c] axel - Another light download accelerator.
[d] iperf - Perform network throughput tests.
Installation
You can use the following yum command to install lftp and iperf under RHEL / CentOS / Fedora Linux:
# yum install lftp iperf
OR use the following apt-get command under Debian or Ubuntu Linux:
$ sudo apt-get install lftp iperf
Step #1: Find out download url
You need a large size file to test download speed. For example, you can visit the home page of "Argonne National Laboratory Public Software Mirror" to grab Centos Linux ISO file.
Step #2: Use lftp command to test download speed
The syntax is:
lftp -e 'pget http://example.com/file.iso; exit; ' lftp -e 'pget http://speedtest.example.com/500M.bin; exit; ' lftp -e 'pget http://mirror.anl.gov/pub/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveCD.iso; exit; '
Sample outputs:
You will also get the report as follows:
725617504 bytes transferred in 65 seconds (10.63M/s)
A note about wget command
You can use the wget command as follows for testing download speed:
$ wget -O /dev/null http://mirror.anl.gov/pub/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveCD.iso
Sample outputs:
Step #3: Use lftp command to test upload speed
The sytnax is as follows:
lftp -u userName ftp.example.com -e 'put largecd1.avi; bye' lftp -u userName,passWord ftp.example.com -e 'put largecd1.avi; bye' lftp -u userName,passWord ftp.example.com -e 'put /path/to/large.iso; bye'
In this example, I am uploading a file to my private ftp server:
lftp -u admin homeserver -e 'cd video; put /home/vivek/Downloads/debian-testing-amd64-CD-1.iso; bye'
OR
lftp -u admin homeserver.public.ip.here -e 'cd video; put /home/vivek/Downloads/debian-testing-amd64-CD-1.iso; bye'
Sample outputs:
How do I test network throughput rate between two Linux or Unix servers?
Consider the following setup:
+------------------+ +----------------+ | Linux server A +--------- ISP Internet-----------+ Linux server B + +------------------+ +----------------+ IP:202.54.1.1 IP:203.54.1.1 iperf server iperf client
Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss. On server A start iperf as follows:
# iperf -s -B 202.54.1.1
On server B type the same command as follows:
# iperf -c 202.54.1.1 -d -t 60 -i 10
Sample outputs:
Where,
- -s : Run in server mode.
- -B IP : Bind to IP, an interface or multicast address.
- -c IP : Run in client mode, connecting to IP.
- -d : Do a bidirectional test simultaneously.
- -t 60 : Time in seconds to transmit for (default 10).
- -i 10 : Pause n seconds between periodic bandwidth reports.
Recommended readings
See the following man pages for information:
man lftp
man wget
man iperf
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











![lftp Mirror Command Exclude Matching Files [ Regex ]](http://s13.cyberciti.org/images/shared/rp/3/7.jpg)





{ 0 comments… add one now }