TRACE-CMD-SPLIT(1)
๐ฆ trace-cmd-split โ like, the libtracefs manual, but make it make sense ๐
okay bestie, so this is trace-cmd-split(1) from the libtracefs Manual and honestly? it's kind of a legend. it takes one big trace.dat and chops it into cute little baby files. slay. โจ
๐ธ SYNOPSIS ๐ธ
trace-cmd split [OPTIONS] [start-time [end-time]]
๐ DESCRIPTION ๐
so trace-cmd(1) split is literally the "break up a trace.dat into small files" girlie. that's her whole thing. ๐
start-time is where the new file starts โ like, where the party begins. pro tip: you can run trace-cmd-report(1), copy the timestamp sitting next to a particular event, and use that as input for either start-time or end-time. iykyk. ๐ซถ
the split stops making files when it hits an event after end-time. and if you only need end-time? just use 0.0 as your start-time. easy.
if start-time is left out, the split starts at the beginning of the file. no notes. if end-time is left out, the split just keeps going until the end of the file โ unless it runs into one of the requirements the options set up. ๐ฆ
โจ OPTIONS โจ
-ifile โ if you don't pass this, the split command goes looking for a file namedtrace.dat(default behaviour, very main character). this option lets you read a different file instead oftrace.dat.-ofile โ by default the split command uses the input file name as the basis for where to write the split files. the output file is the input file with an attached'.#\'on the end:trace.dat.1,trace.dat.2, etc.
this option changes the name of the base file used.
-o file creates file.1, file.2, etc.
-sseconds โ how many seconds should be recorded before the new file should stop.-mmilliseconds โ how many milliseconds should be recorded before the new file should stop.-umicroseconds โ how many microseconds should be recorded before the new file should stop.-eevents โ how many events should be recorded before the new file should stop.-ppages โ the number of pages that should be recorded before the new file should stop.
โ ๏ธ note: only one of-p,-e,-u,-m,-smay be specified at a time. pick one, bestie, you can't have all five. ๐
๐ก if-pis specified, then-cis automatically set. it just happens. no cap.
-rโ this one causes the break up to repeat untilend-timeis reached (or end of the input, if you didn't give anend-time).
trace-cmd split -r -e 10000
this breaks trace.dat into several smaller files, each with at most 10,000 events in it. obsessed. ๐ฅ
-cโ this causes the above break up to be per CPU. iconic behaviour tbh.
trace-cmd split -c -p 10
this creates a file that has 10 pages per each CPU from the input.
-Ccpu โ this splits for a single CPU. only the cpu you name gets extracted from the file.
trace-cmd split -C 1
this splits out all the events for cpu 1 in the file. ๐ง
--topโ this allows you to keep the top buffer. the top buffer can be renamed using the-boption.
trace-cmd split --top
this keeps only the top buffer.
trace-cmd split --top -b old_top
this keeps only the top buffer and renames it 'old_top'. ๐
-Bbuffer โ this allows you to keep the selected buffer. a buffer can be promoted to the top buffer using the-toption.
trace-cmd split -B timer -B sched
this keeps the 'timer' and 'sched' buffers.
trace-cmd split -B timer -t -B sched
this keeps the 'timer' and 'sched' buffers, with the events from the 'timer' buffer promoted to the top instance. ๐ซ
๐ SEE ALSO ๐
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-list(1), trace-cmd-listen(1)
๐ AUTHOR ๐
written by Steven Rostedt, <rostedt@goodmis.org[1]> โ yeah, that Steven Rostedt. respect the icon. ๐ซก
โญ RESOURCES โญ
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/ โ go look, it's giving open source excellence. ๐ฆ
๐ COPYING ๐
Copyright (C) 2010 Red Hat, Inc. free use of this software is granted under the terms of the GNU Public License (GPL). periodt. ๐
๐ NOTES ๐
rostedt@goodmis.orgmailto:rostedt@goodmis.org
and that's the whole page, bestie! it's libtracefs, dated 03/09/2026 โ saved you the scroll, you're welcome ๐โจ๐
๐ฆ where this page comes from
- arch rolling: trace-cmd 3.4-1 ยท GPL-2.0-only AND LGPL-2.1-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms