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 ๐
-bbuffer_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 (default1.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
-tor before any-Bor-a, it resizes the top instance.
-Bbuffer-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-toption 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-tis given.-dโ this one deletes the instance buffer(s) specified by the most recently preceding-Bor-aoption ๐๏ธ and because the top-level instance buffer cannot be deleted, it is invalid to use this immediately following-tor prior to any-Bor-aoption on the command line. so don't do that ๐-tโ resets the top level instance buffer ๐ without the-Bor-aoption this is the same as the default. but if-Bor-ais used, this is required if the top level instance buffer should also be reset.-kdynevent-name โ this option lets you preserve specified dynamic events during reset ๐ง valid parameters arekprobe,kretprobe,uprobe,uretprobe,eprobe,synthandall(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 ๐
rostedt@goodmis.orgmailto: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
- 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