IPTraf is a console-based network monitoring utility. IPTraf gathers data like TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. IPTraf features include:
- An IP traffic monitor that shows information on the IP traffic passing over your network. Includes TCP flag information, packet and byte counts, ICMP details, OSPF packet types.
- General and detailed interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP packet counts, IP checksum errors, interface activity, packet size counts.
- A TCP and UDP service monitor showing counts of incoming and outgoing packets for common TCP and UDP application ports
- A LAN statistics module that discovers active hosts and shows statistics showing the data activity on them
- TCP, UDP, and other protocol display filters, allowing you to view only traffic you're interested in.
- Supports Ethernet, FDDI, ISDN, SLIP, PPP, and loopback interface types.
- Utilizes the built-in raw socket interface of the Linux kernel, allowing it to be used over a wide range of supported network cards.
- Full-screen, menu-driven operation.
CentOS / RHEL / Fedora Linux install IPTraf
Type the following yum command to install IPTraf:
# yum install iptraf
Loaded plugins: auto-update-debuginfo, protectbase, rhnplugin, security This system is receiving updates from RHN Classic or RHN Satellite. 0 packages excluded due to repository protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package iptraf.x86_64 0:3.0.1-14.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: iptraf x86_64 3.0.1-14.el6 rhel-x86_64-server-6 316 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 316 k Installed size: 0 Is this ok [y/N]: y Downloading Packages: iptraf-3.0.1-14.el6.x86_64.rpm | 316 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : iptraf-3.0.1-14.el6.x86_64 1/1 Verifying : iptraf-3.0.1-14.el6.x86_64 1/1 Installed: iptraf.x86_64 0:3.0.1-14.el6 Complete!
How do I use iptraf command?
The syntax is:
iptraf iptraf [options] iptraf -i interface_name_here
To start the IP traffic monitor for eth0 interface type the following command. Pass the -i all option for all interfaces:
# iptraf -i eth0
# iptraf -i all
Access all main menus
If the iptraf is started without any command-line options, the program comes up in interactive mode, with the various facilities accessed through the main menu as follows:
To start the general interface statistics, enter:
# iptraf -g
To see the detailed statistics facility on an interface called eth0
# iptraf -d interface_name_here
# iptraf -d eth0
To see the TCP and UDP monitor on an interface called eth0
# iptraf -z interface_name_here
# iptraf -z eth0
To displays the packet size counts on an interface called eth0
# iptraf -z interface_name_here
# iptraf -z eth0
Here are other options for the program:
-l iface - start the LAN station monitor ("-l all" for all LAN interfaces) -B - run in background (use only with one of the above parameters) -t timeout - when used with one of the above parameters, tells the facility to run only for the specified number of minutes (timeout) -L logfile - specifies an alternate log file for any direct invocation of a facility from the command line. The log is placed in /var/log/iptraf if path is not specified. -I interval - specifies the log interval for all facilities except the IP traffic monitor. Value is in minutes. -f - clear all locks and counters. Use with great caution. Normally used to recover from an abnormal termination.
This tutorial is also available in a quick video format:
See alsoTweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop