Real Time Interactive IP LAN Monitoring with IPTraf Tool
IPTRAF is a simple tool to monitor Inbound and Outbound network traffic passing through interface. IPTraf is an ncurses-based IP LAN monitoring tool (text-based) wherein we can monitor various connections like TCP, UDP, ICMP, non-IP counts and also Ethernet load information etc.
Installing IPTraf
On RHEL, CentOS and Fedora server’s using yum command from terminal.
# yum install iptrafUnder Ubuntu, iptraf can be installed by
$ sudo apt-get install iptrafIPTraf UsageOnce IPTraf installed, run the following command from the terminal to launch an ascii based menu interface that will allow you to view current IP traffic monitoring, General interface statistics, Detailed interface statistics, Statistical breakdowns, Filters and also provide some configure options where you can configure as per your need.
[root@server.com ~]# iptraf
┌─────────────────────────────────┐
│ IP traffic monitor │
│ General interface statistics │
│ Detailed interface statistics │
│ Statistical breakdowns... │
│ LAN station monitor │
│─────────────────────────────────│
│ Filters... │
│─────────────────────────────────│
│ Configure... │
│─────────────────────────────────│
│ Exit │
└─────────────────────────────────┘
Detailed interface statistics IPTraf
┌ Statistics for venet0 ───────────────────────────────────────────────────────────────────────────────┐
│ │
│ Total Total Incoming Incoming Outgoing Outgoing │
│ Packets Bytes Packets Bytes Packets Bytes │
│ Total: 0 0 0 0 0 0 │
│ IPv4: 0 0 0 0 0 0 │
│ IPv6: 0 0 0 0 0 0 │
│ TCP: 0 0 0 0 0 0 │
│ UDP: 0 0 0 0 0 0 │
│ ICMP: 0 0 0 0 0 0 │
│ Other IP: 0 0 0 0 0 0 │
│ Non-IP: 0 0 0 0 0 0 │
│ │
│ │
│ Total rates: 0.0 kbits/sec Broadcast packets: 0 │
│ 0.0 packets/sec Broadcast bytes: 0 │
│ │
│ Incoming rates: 0.0 kbits/sec │
│ 0.0 packets/sec │
│ IP checksum errors: 0 │
│ Outgoing rates: 0.0 kbits/sec │
│ 0.0 packets/sec │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└ Elapsed time: 0:01 ───────────────────────────────────────────────────────────────────────────────┘
You can also monitor TCP/UDP traffic on a specific interface, using the following command.
# iptraf -s eth0