Using the iftop we can monitor the server network traffic and find out which is slowing down your server.
1. cd /usr/local/src/
2. wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz
1. cd /usr/local/src/
2. wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz
3. tar zxf iftop-0.17.tar.gz
4. cd iftop-0.17
5. ./configure
6. make
7. make install
Commands:
iftop -i etho
iftop -i eth0:cp2
S -> display source port
D -> display destination port
D -> display destination port
Error while installing iftop.
ISSUE :1.
./configure
checking for library containing gethostbyaddr_r... none required
checking how to call gethostbyaddr_r... 8 args, int return
checking gethostbyaddr_r usability... yes
checking where to find pcap.h... no idea
configure: error: can't find pcap.h
You're not going to get very far without libpcap.
Fix :
yum install libpcap-devel
DNS traffic
ReplyDeleteiftop -i venet0:0 -f 'port domain'
apache
[/]# iftop -i venet0:0 -f 'port http'