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 use ngrep a lot to inspect HTTP headers to see what's going on. I use the -q flag for quiet output, but I really don't want to see the payloads, only the headers.

Is there a way to do this? My current command is:

ngrep 'Content-Length:' port 80 -t  -W byline -q
share|improve this question
up vote 2 down vote accepted

Have you tried setting -S to a small number?

-S limitlen
  Set the upper limit on the size of packets that ngrep will look at. Useful for 
  looking at only the first N bytes of packets without changing the BPF snaplen.
share|improve this answer
Thanks Dennis, did exactly what I needed. – PeterB Feb 1 '10 at 13:31

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.