Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

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.