| 1 | {{{tracemerge}}} is a libtrace tool that will merge together two (or more) traces into a single trace file. |
| 2 | |
| 3 | === Usage === |
| 4 | {{{tracemerge [ -i | --set-interface ] [ -u | --unique-packets ] outputuri inputuri... }}} |
| 5 | |
| 6 | === Options === |
| 7 | {{{-i, --set-interface}}}:: |
| 8 | 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. |
| 9 | {{{-u, --unique-packets}}}:: |
| 10 | Ignore duplicate packets with identical timestamps |
| 11 | |
| 12 | === Applications === |
| 13 | ==== Concatenating Traces ==== |
| 14 | {{{ |
| 15 | tracemerge erf:merged_trace.gz erf:small_traces-*.gz |
| 16 | }}} |
| 17 | |
| 18 | ==== Merging two directions back into a single trace ==== |
| 19 | {{{ |
| 20 | tracemerge -i erf:merged_trace.gz erf:outcoming.gz erf:incoming.gz |
| 21 | }}} |
| 22 | '''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 |
| 23 | |
| 24 | === Notes === |
| 25 | {{{tracemerge}}} always produces traces where the packets are in timestamp order |