TRACE-CMD-EXTRACT(1)

๐Ÿ’… TRACE-CMD-EXTRACT(1) โ€” the libtracefs girlies' edition ๐ŸŽ€

okay so like, welcome to the libtracefs manual page for trace-cmd-extract โ€” yes bestie, that's the manual name, we're just vibing with it up here instead of doing a whole separate line, slay โœจ


๐ŸŒธ NAME ๐ŸŒธ

trace-cmd-extract โ€” extract out the data from the Ftrace Linux tracer. that's it, that's the whole job, and it does it immaculately ๐Ÿ’–


โœจ SYNOPSIS โœจ

trace-cmd extract [OPTIONS]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so trace-cmd extract (that's the trace-cmd(1) girlie, hi ๐Ÿ‘‹) is usually the thing you run after trace-cmd-start(1) and trace-cmd-stop(1). but lowkey it also works if the Ftrace tracer was started manually through the Ftrace pseudo file system โ€” no gatekeeping here ๐Ÿ’…

what it actually does: it creates a trace.dat file, which is the file that trace-cmd-report(1) reads from. how? it reads the kernel internal ring buffer and turns it into that trace.dat. it's giving data extraction main character energy, no cap ๐Ÿซถ


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -p plugin โ€” so, like, extract doesn't actually start any traces (it's not that kind of girl), but some plugins require just reading the output in ASCII format. those are the latency tracers, because latency tracers have their own separate internal buffer. so the plugin option is only necessary for the wakeup, wakeup-rt, irqsoff, preemptoff and preemptirqsoff plugins. and without this option? the extract command will extract from the internal Ftrace buffers. periodt ๐Ÿ’€
  • -O option โ€” if a latency tracer is being extracted and you used the -p option, then there are some Ftrace options that can change the format. this updates those options before extracting. to see the list of options, go see trace-cmd-list. to enable an option, write its name; to disable the option, append the characters no to it. for example: noprint-parent will disable the print-parent option that prints the parent function when printing a function event. iykyk ๐Ÿงš
  • -o outputfile โ€” default behaviour is that extract creates a trace.dat file. this option changes where that file gets written to. move it, relocate it, make it yours ๐Ÿ’–
  • -s โ€” extract from the snapshot buffer, if the kernel supports it. iconic behaviour only โœจ
  • --date โ€” this is the same as the trace-cmd-record(1) --date option, but (big but) it does cause the extract routine to disable all tracing. that is, the end of the extract will perform something similar to trace-cmd-reset(1). so like, be aware bestie ๐Ÿ™ˆ
  • -B buffer-name โ€” if the kernel supports multiple buffers, this extracts the trace for only the given buffer. it does not affect any other buffer, she's very respectful like that ๐ŸŽ€. you can use this multiple times to specify different buffers. when this option is used, the top level instance will not be extracted unless -t is given.
  • -a โ€” extract all existing buffer instances. when this option is used, the top level instance will not be extracted unless -t is given. same rules, different flag, we love consistency ๐ŸŒˆ
  • -t โ€” extracts the top level instance buffer. without the -B or -a option, this is the same as the default. but if -B or -a is used, this is required if the top level instance buffer should also be extracted. don't forget her or she'll simply not show up ๐Ÿซถ
  • --verbose[=level] โ€” set the log level. supported log levels are "none", "critical", "error", "warning", "info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". setting the log level to a specific value enables all logs from that level and all previous levels. if you don't specify one, the level defaults to "info". so chatty of her ๐Ÿ’…

example โ€” enable all critical, error and warning logs:

trace-cmd extract --verbose=warning

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-reset(1), trace-cmd-split(1), trace-cmd-list(1), trace-cmd-listen(1)

the whole friend group fr fr ๐Ÿ‘ฏโ€โ™€๏ธ


๐ŸŽ€ AUTHOR ๐ŸŽ€

Written by Steven Rostedt, <rostedt@goodmis.org[1]> โ€” the icon, the legend, the moment ๐Ÿ‘‘


๐ŸŒŸ RESOURCES ๐ŸŒŸ

https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/

go look, bestie, it's right there ๐Ÿฆ‹


๐Ÿ’œ COPYING ๐Ÿ’œ

Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL). free use, we love to see it ๐Ÿ“


๐Ÿ“ NOTES ๐Ÿ“

  1. rostedt@goodmis.org mailto:rostedt@goodmis.org

ok that's the whole page!! every flag, every value, every default, all accounted for, nothing dropped ๐Ÿ’…โœจ

and finally, the cute little sign-off: this was the libtracefs manual page, dated 03/09/2026, and the page you just read is TRACE-CMD-EXTRACT(1). mwah, go extract those traces bestie ๐Ÿงšโ€โ™€๏ธ๐Ÿ’–

๐Ÿ“ฆ where this page comes from