'\" t .\" Title: trace-cmd-reset .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 02/10/2024 .\" Manual: libtracefs Manual .\" Source: libtracefs .\" Language: English .\" .TH "TRACE\-CMD\-RESET" "1" "02/10/2024" "libtracefs" "libtracefs Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" trace-cmd-reset \- turn off all Ftrace tracing to bring back full performance .SH "SYNOPSIS" .sp \fBtrace\-cmd reset\fR [\fIOPTIONS\fR] .SH "DESCRIPTION" .sp The trace\-cmd(1) reset command turns off all tracing of Ftrace\&. This will bring back the performance of the system before tracing was enabled\&. This is necessary since \fItrace\-cmd\-record(1)\fR, \fItrace\-cmd\-stop(1)\fR and \fItrace\-cmd\-extract(1)\fR do not disable the tracer, event after the data has been pulled from the buffers\&. The rational is that the user may want to manually enable the tracer with the Ftrace pseudo file system, or examine other parts of Ftrace to see what trace\-cmd did\&. After the reset command happens, the data in the ring buffer, and the options that were used are all lost\&. .SH "OPTIONS" .sp Please note that the order that options are specified on the command line is significant\&. See EXAMPLES\&. .PP \fB\-b\fR \fIbuffer_size\fR .RS 4 When the kernel boots, the Ftrace ring buffer is of a minimal size (3 pages per CPU)\&. The first time the tracer is used, the ring buffer size expands to what it was set for (default 1\&.4 Megs per CPU)\&. .sp .if n \{\ .RS 4 .\} .nf If no more tracing is to be done, this option allows you to shrink the ring buffer down to free up available memory\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-b 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf The buffer instance affected is the one (or ones) specified by the most recently preceding *\-B*, *\-t*, or *\-a* option: .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf When used after *\-B*, resizes the buffer instance that precedes it on the command line\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf When used after *\-a*, resizes all buffer instances except the top one\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf When used after *\-t* or before any *\-B* or *\-a*, resizes the top instance\&. .fi .if n \{\ .RE .\} .RE .PP \fB\-B\fR \fIbuffer\-name\fR .RS 4 If the kernel supports multiple buffers, this will reset the trace for only the given buffer\&. It does not affect any other buffer\&. This may be used multiple times to specify different buffers\&. The top level buffer will not be reset if this option is given (unless the \fB\-t\fR option is also supplied)\&. .RE .PP \fB\-a\fR .RS 4 Reset the trace for all existing buffer instances\&. When this option is used, the top level instance will not be reset unless \fB\-t\fR is given\&. .RE .PP \fB\-d\fR .RS 4 This option deletes the instance buffer(s) specified by the most recently preceding \fB\-B\fR or \fB\-a\fR option\&. Because the top\-level instance buffer cannot be deleted, it is invalid to use this immediatly following \fB\-t\fR or prior to any \fB\-B\fR or \fB\-a\fR option on the command line\&. .RE .PP \fB\-t\fR .RS 4 Resets the top level instance buffer\&. Without the \fB\-B\fR or \fB\-a\fR option this is the same as the default\&. But if \fB\-B\fR or \fB\-a\fR is used, this is required if the top level instance buffer should also be reset\&. .RE .SH "EXAMPLES" .sp 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: .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-B instance\-one \-b 4096 \-B instance\-two \-d .fi .if n \{\ .RE .\} .sp Delete all instance buffers\&. Top level instance remains unaffected: .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-a \-d .fi .if n \{\ .RE .\} .sp Delete all instance buffers and also reset the top instance: .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-t \-a \-d .fi .if n \{\ .RE .\} .sp Invalid\&. This command implies an attempt to delete the top instance: .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-a \-t \-d .fi .if n \{\ .RE .\} .sp Reset the top instance and set its per\-cpu buffer size to 1024kb\&. If any instance buffers exist, they will be unaffected: .sp .if n \{\ .RS 4 .\} .nf trace\-cmd reset \-b 1024 .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp 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) .SH "AUTHOR" .sp Written by Steven Rostedt, <\m[blue]\fBrostedt@goodmis\&.org\fR\m[]\&\s-2\u[1]\d\s+2> .SH "RESOURCES" .sp \m[blue]\fBhttps://git\&.kernel\&.org/pub/scm/utils/trace\-cmd/trace\-cmd\&.git/\fR\m[] .SH "COPYING" .sp Copyright (C) 2010 Red Hat, Inc\&. Free use of this software is granted under the terms of the GNU Public License (GPL)\&. .SH "NOTES" .IP " 1." 4 rostedt@goodmis.org .RS 4 \%mailto:rostedt@goodmis.org .RE