This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

how to simultaneously filter and merge several pcap files

0

Hi all,

I would like to simultaneously filter and merge several pcap files. Combination of tshark and mergecap is a costly operation in my context (the combination implies that one have to visit each packets twice: first for filtering, second for mering). But I am looking for a tool which does that in one visit per packet (check if packet match with filter, then merge). After googling, I found someone did it with tracesplit but with no more explanation about the syntax...

asked 19 Feb '15, 08:50

ikuzar's gravatar image

ikuzar
11435
accept rate: 0%


One Answer:

0

tracesplit does the opposite or merging ("tracesplit splits one trace into multiple tracefiles").

To give any meaningful answer, please add more details.

  • What do you mean exactly by "is a costly operation in my context"?
  • What kind of filters do you need? Capture filters or display filters?
  • How do you want to merge the files? Just append or in a chronological correct order?

Regards
Kurt

answered 23 Feb '15, 09:44

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

also, merging is a real fast process, especially if concatenating files, so filtering with tshark and then merging the filtered results is usually really quick.

(23 Feb '15, 12:11) Jasper ♦♦

many process and threads are running in my program. I just want to optimize the execution time of filtering/merging/compressing. I need capture filters and I just want to merge by appending packets.

(30 Mar '15, 02:49) ikuzar

can you please add an example of what you are trying to do?

(30 Mar '15, 04:08) Kurt Knochner ♦