Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to see whole HTTP packets sent and recieved by an application for debugging purposes. How can this be done in command-line?

share|improve this question
up vote 3 down vote accepted

You can use a tcpdump command like:

$ sudo tcpdump -i <interface> -s 1518 -XX -vv -n "tcp port 80"

You customize the command according to your needs. You can add -w filename.pcap to save the dump to a file. Then, you can read the dump file using -r filename.pcap.

share|improve this answer
You can use -s0 for no limit to the snaplen. – Cakemox Mar 4 '11 at 11:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.