Wednesday, August 17, 2011

http traffic load

On some occasion , we need to calculate http traffic of our system. Although there are a number of tools and utilities but i avoid to install and use them in small size set-up.

I decided to use tcpdump command , tcpdump command is very useful command that help to decode network traffic. For example for above given requirement i applied tcpdump command in following format.

tcpdump -s 1500 -Svni eth0 tcp and port 80

Above given command will display http packets (tcp packet of port number 80). In output of command we can get total length which is equal to IP Header Length + TCP Header Length + Payload Length . As we know IP Header + TCP Header length will be 52 , so we can calculate payload length which will be Total Length -52.