August 12, 2015

[ iftop ] A Network Bandwidth Monitoring Tool for Linux

iftop is used to view the current bandwidth on a network interface. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. iftop must be run by a root user or a user who has sufficient privileges to monitor network bandwidths.
Installing iftop
On Debian/Ubuntu:
sk@sk:~$ sudo apt-get install iftop
On CentOS/RHEL:
iftop will not be found in official repositories. So let us add EPEL repository to install iftop:
[root@server ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Now install it using the following command:
[root@server ~]# yum install iftop
Usage
iftop is very simple to use. Just type the iftop command on terminal with root privileges to display the bandwidth usage of the first network interface. Press to exit from the iftop command output.
[root@server ~]# iftop
root@server_001
To view the source and destination listening ports, just press SHIFT+S and SHIFT+D. It will display the traffic along with source and destination ports.
root@server_007
To view the network bandwidth of a particular interface, use the following command.
[root@server ~]# iftop -i eth0
root@server_002
By default, iftop will display all traffic in kilo/mega/giga bits per second. To display all traffic in bytes instead of bits the parameter -B(Capital B).
[root@server ~]# iftop -i eth0 -B
root@server_003
To display the traffic on which port is occurring, use -P and -N switches with iftop command.
[root@server ~]# iftop -i eth0 -P -N
The parameter -N displays the port number.
root@server_004
To view the in and out packet flowing of a network, use the following command.
 [root@server ~]# iftop -F 192.168.1.0/24
For more information about iftop command, refer the man pages using the following command:
[root@server ~]# man iftop

Related Posts:

  • Hoặc cài đặt SSMTP trên Shinken Server Tại Shinken host sudo apt-get install ssmtp mailutils -y Sửa file cấu hình vi /etc/ssmtp/ssmtp.conf # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=shinkenvdc@gmail.com … Read More
  • Hướng dẫn sử dụng nrpe Tại Linux host được monitor wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz tar -xvf nrpe-2.15.tar.gz cd nrpe-2.15/ useradd nagios apt-get install libssl-dev xinetd nagios-plugins -y ./… Read More
  • Hướng dẫn Giám sát một Switch Cisco Bật SNMP trên switch cisco enable config terminal snmp-server community public RO snmp-server host 10.145.34.130 public Cấu hình tại Shinken host Cài đặt plugin check_nwc_health su - shinken wget http://labs.consol.de/d… Read More
  • Hướng dẫn cấu hình để gửi SMS cảnh báo bằng USB 3G Thực hiện trên Shinken host Cài đặt và kiểm tra usb 3g để gửi SMS Hướng dẫn Cần đảm bảo USB 3g đã gửi SMS thành công bằng chương trình gsmsendsms qua cổng /dev/ttyUSB0 cau hinh shinken vi /etc/shinken/hosts/test.cfg def… Read More
  • cấu hình shinken để gửi mail Tại host shinken Sửa file cấu hình host cần gửi email cảnh báo vi /etc/shinken/hosts/srv-webserver.cfg define host{ use linux-ssh host_name webserver-local address 10.145.34.131 contacts admin ;người dùng được gửi mai… Read More

0 comments:

Post a Comment