Version 2 (modified by spa1, 14 years ago) (diff)


tracemerge is a libtrace tool that will merge together two (or more) traces into a single trace file.


tracemerge [ -i | --set-interface ] [ -u | --unique-packets ] outputuri inputuri...


-i, --set-interface
Replace the direction/interface bit in the format header based on which input trace the packet comes from, e.g. direction is 0 for packets from the first input file, 1 for packets from the second file, etc.
-u, --unique-packets
Ignore duplicate packets with identical timestamps


Concatenating Traces

tracemerge erf:merged_trace.gz erf:small_traces-*.gz

Merging two directions back into a single trace

tracemerge -i erf:merged_trace.gz erf:outgoing.gz erf:incoming.gz

Note: most libtrace applications regard a direction of 0 as outgoing and a direction of 1 as incoming, so be sure to specify the input URIs the correct way around


tracemerge always produces traces where the packets are in timestamp order