Skip to content

Monitoring network traffic on CentOS 5.6

One activity on our servers that I consistently monitor is that of network operations. Most times the real bottle neck of websites running slow or going down, could somewhere relate to network issues. A few of the tools that I use include nmap, iptraf and iftop.

IPTraf is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.

yum install -y iptraf

Nmap (“Network Mapper”) is a free and open source (license) utility for network exploration or security auditing. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.

yum install -y nmap

Iftop does for network usage what top does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question “why is our network link so slow?”. Iftop requires a few dependencies such libpcap and libcurses before it can be installed.

yum install -y libpcap
yum install -y libpcap-devel
yum install -y ncurses-devel
yum install -y wget
yum install -y gcc
yum install -y automake
yum install -y make
cd /usr/local/src
tar -zxvf iftop-0.17.tar.gz
cd iftop-0.17
make && make install
chmod 700 /usr/local/sbin/iftop

Leave a Reply