Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am just tracing a very sporadic error in responses to HTTP requests to a specific resource on an embedded device's webserver.

So my plan is to run a test over night (or even weekend), capture the traffic with wireshark and then skim the dumpfiles for damaged responses.

With "http.request.uri matches "^/resource/to/be/tested" display filter I get all wanted requests.

But I need all the responses to these requests - how can I archive this?

share|improve this question
up vote 1 down vote accepted

You can do it with tshark follow the below steps:

  1. Filter all HTTP packets with specific pattern in request uri
  2. Follow TCP stream based on src IP, src port, dst IP, dst port
$ tshark -r x.pcap -R 'http.request.uri matches "^/resource/to/be/tested"' \
-T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport | \
while read line; do 
    tshark -r x.pcap \
    -R "http && ip.addr == `echo $line | awk '{ print $1 }'` && \
    tcp.port == `echo $line | awk '{ print $2 }'` && \
    ip.addr == `echo $line | awk '{ print $3 }'` && \
    tcp.port == `echo $line | awk '{ print $4 }'`" \
share|improve this answer

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.