Debian tools or ways to measure LAN speeds

Posted on 2013-05-14
Medium Priority
Last Modified: 2013-05-17
Anyone here know any good Debian tools or ways to measure LAN speeds on for instance a Samba share from one PC to another on the same LAN?
Question by:itnifl
LVL 21

Accepted Solution

Mazdajai earned 500 total points
ID: 39166851
You can use iperf to measure network throughput, it is available for windows and linux.
LVL 68

Assisted Solution

woolmilkporc earned 320 total points
ID: 39167254
If you have an FTP server running on one of the machines and an FTP client on the other one (probably you do) then this command will show the network transfer rate, without reading or writing from/to disk:

put "| dd if=/dev/zero bs=1m count=1000" /dev/null

The example above will transfer 1 GB of binary zeroes and measure/display the transfer speed.

I once made a script around the above command:

# --- Variables --- #

# --- Doit --- #
ftp -n $host <<EOF 2>/dev/null | awk -F"[()]" '/bytes/ {printf "FTP transfer speed \('$mb' MB\) to '$host': %g MB/s\n", $2/1024}'
quote user $user
quote pass $pass
put "| dd if=/dev/zero bs=1m count=$mb" /dev/null

Open in new window

Change userid and password to your values and specify the target host and the amount of megabytes to transfer on the commandline, like

myscript myhost 1000

(assuming you called the script myscript).


Assisted Solution

GhostInTheMacheen earned 180 total points
ID: 39168100
Depending on how granular a view you want to have the are a number of tools available.

I usually use netstat (on Debian try "sudo netstat -antp") to get a per-port or per process listing and then use either iptraf or iftop to view the realtime network I/O on specific connections.

iftop is probably a little easier to jump into, but iptraf has a more configurable interface.

There's also a great application called nethogs that will give you a very simple (top like) per-process network I/O view with process name.

All three are available in the Debian apt repositories.

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question