'\" t .\" Title: trace-cmd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 02/10/2024 .\" Manual: libtracefs Manual .\" Source: libtracefs .\" Language: English .\" .TH "TRACE\-CMD" "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 \- interacts with Ftrace Linux kernel internal tracer .SH "SYNOPSIS" .sp \fBtrace\-cmd\fR \fICOMMAND\fR [\fIOPTIONS\fR] .SH "DESCRIPTION" .sp The trace\-cmd(1) command interacts with the Ftrace tracer that is built inside the Linux kernel\&. It interfaces with the Ftrace specific files found in the debugfs file system under the tracing directory\&. A \fICOMMAND\fR must be specified to tell trace\-cmd what to do\&. .SH "COMMANDS" .sp .if n \{\ .RS 4 .\} .nf record \- record a live trace and write a trace\&.dat file to the local disk or to the network\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf set \- set a ftrace configuration parameter\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf report \- reads a trace\&.dat file and converts the binary data to a ASCII text readable format\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf stream \- Start tracing and read the output directly .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf profile \- Start profiling and read the output directly .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf hist \- show a histogram of the events\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf stat \- show tracing (ftrace) status of the running system .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf options \- list the plugin options that are available to *report* .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf start \- start the tracing without recording to a trace\&.dat file\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf stop \- stop tracing (only disables recording, overhead of tracer is still in effect) .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf restart \- restart tracing from a previous stop (only effects recording) .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf extract \- extract the data from the kernel buffer and create a trace\&.dat file\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf show \- display the contents of one of the Ftrace Linux kernel tracing files .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf reset \- disables all tracing and gives back the system performance\&. (clears all data from the kernel buffers) .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf clear \- clear the content of the Ftrace ring buffers\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf split \- splits a trace\&.dat file into smaller files\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf list \- list the available plugins or events that can be recorded\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf listen \- open up a port to listen for remote tracing connections\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf agent \- listen on a vsocket for trace clients .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf setup\-guest \- create FIFOs for tracing guest VMs .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf restore \- restore the data files of a crashed run of trace\-cmd record .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf snapshot\- take snapshot of running trace .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf stack \- run and display the stack tracer .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf check\-events \- parse format strings for all trace events and return whether all formats are parseable .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf convert \- convert trace files .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf attach \- attach a host trace\&.dat file to a guest trace\&.dat file .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf dump \- read out the meta data from a trace file .fi .if n \{\ .RE .\} .SH "OPTIONS" .PP \fB\-h\fR, \-\-help .RS 4 Display the help text\&. .RE .sp Other options see the man page for the corresponding command\&. .SH "SEE ALSO" .sp trace\-cmd\-record(1), trace\-cmd\-report(1), trace\-cmd\-hist(1), trace\-cmd\-start(1), trace\-cmd\-stop(1), trace\-cmd\-extract(1), trace\-cmd\-reset(1), trace\-cmd\-restore(1), trace\-cmd\-stack(1), trace\-cmd\-convert(1), trace\-cmd\-split(1), trace\-cmd\-list(1), trace\-cmd\-listen(1), trace\-cmd\&.dat(5), trace\-cmd\-check\-events(1), trace\-cmd\-stat(1), trace\-cmd\-attach(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