Useful Tools to Display Network Usage in Linux

ethernet_card
In this article we would like to introduce you two simple and smart Linux command line tools to monitor bandwidth usage on all network interfaces in the real time: iftop and nload.

1. iftop – command line tool that displays bandwidth usage on an interface
iftop listens to network traffic on a named interface, or on the first interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts.

Installation (CentOS/Fedora/RHEL):

[root@fixxxer ~]# yum install iftop 

Examples of usage:

a) iftop invoked without parameters displays bandwidth usage on default network interface:

[root@fixxxer ~]# iftop 

iftop

b) iftop invoked with -i parameter displays bandwidth usage on particular interface

[root@fixxxer ~]# iftop -i br0p37p1 

c) iftop invoked with -p parameter is launched in promiscuous mode (captures also traffic not passing through the chosen network interface)

[root@fixxxer ~]# iftop -p 

d) iftop invoked with -F parameter displays only packets flowing in to or out of the given network

[root@fixxxer ~]# iftop -F 192.168.2.0/24

e) iftop invoked with -B parameter displays bandwidth rates in bytes/sec rather than bits/sec

[root@fixxxer ~]# iftop -B

2. nload – displays the current network usage
nload is another console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs.

Installation (CentOS/Fedora/RHEL):

[root@fixxxer ~]# yum install nload 

Examples of usage:

a) nload invoked without parameters displays bandwidth on the default interface in two graphs for incoming and outgoing traffic

[root@fixxxer ~]# nload 

nload
You can navigate between interfaces using TAB key or arrow keys, press q key to quit.

b) nload invoked with -m parameter displays multiple interfaces bandwidth without graphs

[root@fixxxer ~]# nload -m

nload_multiple

c) nload invoked with -t parameter determines the refresh interval of the display in milliseconds

[root@fixxxer ~]# nload -t 700

Share on: Share on FacebookShare on Google+Tweet about this on TwitterShare on StumbleUponShare on LinkedInPin on PinterestBuffer this pageShare on TumblrDigg thisFlattr the authorShare on RedditShare on VKShare on Yummly
Liked it? Take a second to support tuxfixer.com on Patreon!
Hadoop Developer Training

One thought on “Useful Tools to Display Network Usage in Linux

  1. Jan December 8, 2015 at 11:42

    This is what System Administrator should know ! Great !

Leave a Reply

Name *
Email *
Website