Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a simple command line linux tool that will show me the current network usage, the same way top displays CPU usage.

What is the most standard tool (I can't install new things on the server) that will do the task. I don't need anything fancy and a simple text based tool will do.

share|improve this question
up vote 5 down vote accepted

i like ifstat:

brzoza:~# ifstat -b 1
       eth0                eth1                eth2       
 Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out
 7870.11  27165.49  24776.69   7626.12      0.00      0.00
 8738.48  27760.18  26787.02   7851.60      0.00      0.00
 8532.13  28028.55  26122.37   7850.08      0.00      0.00
 9029.12  25981.44  23108.86   8282.37      0.00      0.00

but there is much more - iptraf, iftop, nload just to name the few.

if you cannot really install / compile anything new - you'll have to write simple script parsing the output of ifconfig and calculating incements for input/output counters. two examples i've found: here and here.

share|improve this answer

Here are two tools that are worth checking out, although they are probably not available by default on your distribution :

  • nethogs : a simple tool that will display the network usage by process :

alt text

  • tcptrack is also very good, especially on a gateway - you can get the bandwidth used by any IP adress coming in or out your server :

alt text

share|improve this answer

On top of what pQd has mentioned, one of my favourites is pktstat instead. I often used that.

share|improve this answer

My favorite so far is ifstatus. It is curses based so it works in a terminal and it gives a graph of your traffic history over time (fully configurable).

share|improve this answer

ntop might be what you are looking for.

share|improve this answer

List open conncetions

lsof -i :80

List all services called httpd

lsof -i -nP | grep httpd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.