babeltrace2-filter.utils.muxer - Linux


babeltrace2-filter.utils.muxer is a command-line utility that provides multiplexing capabilities for trace data, allowing you to combine multiple trace streams into a single output file. It is designed for use with the Babeltrace 2 tracing framework.


babeltrace2-filter.utils.muxer [options] <> [<> ...] -o <>



  • -o, –output: Specify the output file name.


  • -f, –filter: Apply a filter expression to the input trace streams. (e.g., " == "my_app"")
  • -t, –tag: Assign a tag to the output file.
  • -r, –replace: Replace the existing output file if it exists.
  • -z, –compress: Compress the output file using LZ4.
  • -j, –threads: Set the number of threads to use for multiplexing. (Default: number of CPU cores)
  • –clock-sync: Synchronize the timestamps of the input trace streams based on their global.trace_id field.


Simple multiplexing:

babeltrace2-filter.utils.muxer -o

Multiplexing with filtering:

babeltrace2-filter.utils.muxer -o -f " == \"my_app\""

Replacing existing output:

babeltrace2-filter.utils.muxer -o -r

Common Issues

  • File Format Error: Ensure that the input trace files are in the correct Babeltrace 2 format.
  • Timestamp Misalignment: If the input trace streams have different start times or clocks, consider using --clock-sync to synchronize them.
  • Input File Conflicts: If multiple input files contain the same global trace id, the output file may contain duplicate data.


  • Use babeltrace2-filter.utils.demuxer to extract specific trace streams from the multiplexed file.
  • Combine with babeltrace2-filter.utils.merge to merge multiple trace files into a single stream before multiplexing.

Related Commands

  • babeltrace2-filter.utils.demuxer: Demultiplexes a Babeltrace 2 trace file.
  • babeltrace2-filter.utils.merge: Merges multiple Babeltrace 2 trace streams.
  • babeltrace2-viewer: Viewer for Babeltrace 2 trace files.
  • Official Babeltrace2 Documentation