Did You Know?
Donate to TecMint

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

Install IfTop (Bandwidth Monitoring) Tool in RHEL / CentOS / Fedora

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

In our earlier article, we reviewed the usage of TOP Command and it’s parameters. In this article we have came up with another excellent program called Interface TOP (IFTOP) is a real time network bandwidth monitoring tool through Command line. It will show a quick overview of network activities. In a TOP command you can see percentage usage of CPU, Memory and SWAP in real time. But IFTOP shows a real time updated list of network connections based on their network usage ordered on every 2, 10 and 40 seconds average. In this post we are going to see the installation and how to use IFTOP with examples.

Install iftop in Linux

Install iftop in RHEL / CentOS / Fedora

IFTOP Pre-requisite

  1. libpcap : module provides a user-level network packet capture information and statistics.
  2. libncurses : is a API programming library that enables programmers to provide text-based interfaces in a terminal.

Install libpcap and libncurses

Installation of the libpcap and libncurses library with YUM command as shown below for error-free iftop installation.

# yum -y install libpcap libpcap-devel ncurses ncurses-devel

Download and Install IFTOP

Download iftop from it’s website with Wget command as shown below.

# wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz

Follow the below all commands to install iftop.

# tar -zxvf iftop-0.17.tar.gz
# cd iftop-0.17
# ./configure
# make
# make install

Basic usage of Iftop

Once installation done, go to your console and type iftop command.

# iftop

Sample output of iftop command which shows bandwidth of default interface as shown below.

iftop command

iftop screenshot

Monitoring Specific Interface

You can give a specific interface to monitor with -i option.

# iftop -i eth0
iftop eth0 command

iftop eth0 command Screenshot

Iftop Options and Usage

While running iftop you can use the keys like S, D to see more information like source, destination etc. Please do man iftop if you want to explore more options and tricks. Press ‘q‘ to quit from running windows.

In this article we have seen how to install and usage of iftop. if you want to know more about it please visit iftop website. Kindly share it and send your comment through our comment box below.

He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.
Download Free eBooks
Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

14 Responses

  1. Rigan says:

    Nice help /.//// it work fine my centos 5.8 32bit

  2. Patrick says:

    Thanks for this guide.

    A shame I didn’t knew about this utitily all the years I work with Linux, as it’s already included in centos 6 when using the epel repository and just needed to be installed.

  3. SAM says:

    Its shoing TX == In GB

    RX == in MB

    Can u tell me how to stop transfer

  4. Josh says:

    You know something is up with your network when it takes ages to download the libpcap library.

  5. Rajesh.raf says:

    Hi to all…. how to trace in CentOS the client user browsing which website…..?? it is possible to trace it?????

  6. Rajesh.raf says:

    Ravi..thanks for your answer…:)

  7. Abdou says:

    Hi Ravi , please I have a question, do you think that the traffic could be applied for a specific website ? for example, the user have 500 Kb/s for the download and 300Kb/s for the upload when he connect to zippyshare.com ( for exple) , and have the full speed when he connect to other websites ?

    • Ravi Saive says:

      Dear Vicky,

      The IfTop only monitors bandwidth it doesn’t provide any restriction module. If you want to restrict or specify bandwidth limit to specific user or website use Proxy.

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.