babeltrace2-sink.text.pretty - Linux


babeltrace2-sink.text.pretty is a command-line tool used to output formatted trace events to the standard output in a human-readable format. This command streamlines the process of inspecting and analyzing trace events captured using the Babeltrace framework.


babeltrace2-sink.text.pretty [options]


  • -c, –comma-separated: Format the output as comma-separated values (CSV).
  • -d, –differences: Print diffs between two traces.
  • -e, –event-filter: Filter events based on a specified expression.
  • -f, –field-filter: Filter fields based on a specified expression.
  • -h, –help: Display help information.
  • -i, –interactive: Enter interactive mode, which allows filtering and sorting of events.
  • -n, –num-events: Limit the number of events to print.
  • -o, –output-file: Specify an output file for trace events.
  • -s, –sort: Sort the events based on a specified field.
  • -t, –timestamp-format: Specify the format of the timestamp output. Available formats: "dec", "hex", "datetime", "relative".
  • -v, –verbose: Display additional information about the events.


Simple output:

babeltrace2-sink.text.pretty -n 100 /tmp/

Comma-separated output:

babeltrace2-sink.text.pretty -c /tmp/

Filter events by name:

babeltrace2-sink.text.pretty -e name='my_event' /tmp/

Sort events by timestamp:

babeltrace2-sink.text.pretty -s ts /tmp/

Compare two traces:

babeltrace2-sink.text.pretty -d /tmp/ /tmp/

Common Issues

Incorrect trace format:

If the trace file is not a valid Babeltrace trace, the command will fail with an error message. Ensure that the trace file has the correct format and was generated using the Babeltrace framework.


Combining with other tools:

babelpy: The Python library for Babeltrace allows for integration with Python scripts and advanced data processing capabilities.

Related Commands

  • babeltrace2: Main Babeltrace command for analyzing traces.
  • babeltrace2-sink.json: Output trace events as JSON.
  • babeltrace2-sink.lttng: Convert trace events to LTTng format.