babeltrace2-filter.utils.trimmer - Linux
Overview
babeltrace2-filter.utils.trimmer
is a tool for trimming events from a trace that are outside a specified time range. It can be used to reduce the size of a trace file, or to focus on a specific period of time.
Syntax
babeltrace2-filter.utils.trimmer [OPTIONS] INPUT_TRACE OUTPUT_TRACE START_TS END_TS
Options/Flags
-h, --help
prints a help message and exits.--set-timestamps
sets the timestamps of the trimmed events to the start or end of the trimmed range, as specified by the--trim-boundary
option.--trim-boundary
sets the boundary for trimming events. Valid values arestart
andend
. Default:start
.--keep-partial-events
keeps partial events that overlap with the trimmed range. Default:false
.
Examples
To trim events from a trace that are between 10 and 20 seconds, use:
babeltrace2-filter.utils.trimmer -s 10 -e 20 input.trace output.trace
To trim events from a trace that are outside of the range 10-20 seconds, use:
babeltrace2-filter.utils.trimmer -s 10 -e 20 --trim-boundary end input.trace output.trace
Common Issues
If the output trace is empty, it is possible that the start and end timestamps are reversed.
Integration
babeltrace2-filter.utils.trimmer
can be used with other babeltrace2
tools to filter and analyze traces. For example, it can be used with babeltrace2-filter.utils.stats
to generate statistics about the trimmed events.
Related Commands
babeltrace2-filter.utils.stats
babeltrace2-filter.utils.trimmer
babeltrace2-filter.utils.mover