TRACE-CMD-RESET(1)

๐Ÿ’… TRACE-CMD-RESET(1) โ€” the libtracefs manual, but make it make sense โœจ

okay bestie, buckle up, because this is the page for trace-cmd-reset ๐ŸŽ€

โœจ NAME โœจ

trace-cmd-reset โ€” turn off all Ftrace tracing to bring back full performance ๐Ÿฆ‹

๐ŸŒธ SYNOPSIS ๐ŸŒธ

trace-cmd reset [OPTIONS]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so the trace-cmd(1) reset command literally turns off ALL tracing of Ftrace. like, all of it. and that's a good thing, because it brings back the performance your system had before tracing was even a thing ๐Ÿ‘‘

and ngl, this is genuinely necessary, because trace-cmd-record(1), trace-cmd-stop(1) and trace-cmd-extract(1) do not disable the tracer โ€” not even after the data has been pulled from the buffers ๐Ÿ˜ญ the reasoning (the "rational", as the page calls it) is that the user might want to manually enable the tracer with the Ftrace pseudo file system, or go poke around other parts of Ftrace to see what trace-cmd did ๐Ÿ•ต๏ธโ€โ™€๏ธ

โš ๏ธ but here's the part you need to hear: after the reset command happens, the data in the ring buffer, and the options that were used are all lost. gone. periodt. ๐Ÿ’€

๐Ÿฆ‹ OPTIONS ๐Ÿฆ‹

okay so heads up before we start: the order you specify options on the command line is significant. fr fr. see EXAMPLES below ๐Ÿ‘‡

  • -b buffer_size โ€” so when the kernel boots, the Ftrace ring buffer is a minimal size (3 pages per CPU). the first time the tracer is used, the ring buffer size expands to whatever it was set for (default 1.4 Megs per CPU). if you're not doing any more tracing, this option lets you shrink the ring buffer down to free up available memory ๐Ÿ’พ

like:

trace-cmd reset -b 1

the buffer instance affected is the one (or ones) specified by the most recently preceding -B, -t, or -a option:

  • when used after -B, it resizes the buffer instance that precedes it on the command line.
  • when used after -a, it resizes all buffer instances except the top one.
  • when used after -t or before any -B or -a, it resizes the top instance.
  • -B buffer-name โ€” if the kernel supports multiple buffers, this resets the trace for only the given buffer ๐ŸŽฏ it does not affect any other buffer. you can use this multiple times to specify different buffers. the top level buffer will not be reset if this option is given (unless the -t option is also supplied).
  • -a โ€” reset the trace for all existing buffer instances ๐ŸŒˆ when this option is used, the top level instance will not be reset unless -t is given.
  • -d โ€” this one deletes the instance buffer(s) specified by the most recently preceding -B or -a option ๐Ÿ—‘๏ธ and because the top-level instance buffer cannot be deleted, it is invalid to use this immediately following -t or prior to any -B or -a option on the command line. so don't do that ๐Ÿ™ˆ
  • -t โ€” resets 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 reset.
  • -k dynevent-name โ€” this option lets you preserve specified dynamic events during reset ๐Ÿงš valid parameters are kprobe, kretprobe, uprobe, uretprobe, eprobe, synth and all (for keeping all dynamic events). you can use this multiple times to specify different dynamic event types.

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

reset tracing for instance-one and set its per-cpu buffer size to 4096kb. also deletes instance-two. the top level instance and any other instances remain unaffected:

trace-cmd reset -B instance-one -b 4096 -B instance-two -d

delete all instance buffers. top level instance remains unaffected:

trace-cmd reset -a -d

delete all instance buffers and also reset the top instance:

trace-cmd reset -t -a -d

invalid. this command implies an attempt to delete the top instance ๐Ÿ’€

trace-cmd reset -a -t -d

reset the top instance and set its per-cpu buffer size to 1024kb. if any instance buffers exist, they will be unaffected:

trace-cmd reset -b 1024

prevent kprobes and kretprobes from being destroyed during reset:

trace-cmd reset -k kprobe -k kretprobe

๐Ÿซถ 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-split(1), trace-cmd-list(1), trace-cmd-listen(1)

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

written by Steven Rostedt, <rostedt@goodmis.org[1]> ๐Ÿ’Œ

โญ RESOURCES โญ

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

๐ŸŒธ COPYING ๐ŸŒธ

copyright (C) 2010 Red Hat, Inc. free use of this software is granted under the terms of the GNU Public License (GPL) ๐Ÿ“œ

๐Ÿ’œ NOTES ๐Ÿ’œ

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

and that's the whole page bestie, you ate that ๐Ÿ“ mwah ๐Ÿ’‹

this lil beauty comes to you from libtracefs, dated 03/09/2026, and it's still called TRACE-CMD-RESET(1) if anyone asks ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from