Iptraf-ng network monitoring tool

Network monitoring with iptraf-ng


iptraf-ng is a menu driven utility that allows you to monitor your TCP network. Information such as ICMP, OSPF, TCP and UDP counts can be displayed easily. Interfaces can be monitored. Monitor connectivity and traffic with ease. This package was formerly known as "iptraf", however, it has been updated and is now called "iptraf-ng" - iptraf - next generation.

Installing iptraf-ng

iptraf-ng can be installed directly from the repositories on the following systems:

To install iptraf-ng on a Debian/Ubuntu/Mint system, issue the command: sudo apt install iptraf-ng

To install iptraf-ng on a openSUSE system, issue the command: zypper install iptraf-ng

To install htop on a RHEL 8 or CentOS 8 system, issue the command: dnf install iptraf-ng

Example install in CentOS 8

Command issued to install: dnf install iptraf-ng

Linux iptraf-ng

iptraf-ng main menu

To start iptraf-ng, you must issue the following command: sudo iptraf-ng"

Linux iptraf-ng menu

At the main menu screen you can select which interfaces you want to monitor on your system. In this example, my system has only a single interface "enp5ps0".

Linux iptraf-ng interface monitoring

Detailed Interface Statistics

The detailed statistic option will provide statistics for the chosen interface, providing packets in and out and the total size in bytes.

Linux iptraf-ng Statistics

Command Line Options

The monitoring interface can be started directly from the command line by using any of the following options:


usage: iptraf-ng [options]
   or: iptraf-ng [options] -B [-i  | -d  | -s  | -z  | -l  | -g]

    -h, --help            show this help message

    -i             start the IP traffic monitor (use '-i all' for all interfaces)
    -d             start the detailed statistics facility on an interface
    -s             start the TCP and UDP monitor on an interface
    -z             shows the packet size counts on an interface
    -l             start the LAN station monitor (use '-l all' for all LAN interfaces)
    -g                    start the general interface statistics

    -B                    run in background (use only with one of the above parameters
    -f                    clear all locks and counters
    -t                 run only for the specified  number of minutes
    -L           specifies an alternate log file

For example, to monitor all interfaces immediately, you could issue the command: sudo iptraf-ng -i all