LinuxCommandLibrary

trace-cmd

Linux kernel Ftrace tracing frontend

TLDR

Display tracing status

$ sudo trace-cmd stat
copy
List available tracers
$ sudo trace-cmd list -t
copy
Start tracing with plugin
$ sudo trace-cmd start -p [function|function_graph|irqsoff|wakeup]
copy
View trace output
$ sudo trace-cmd show
copy
Stop tracing
$ sudo trace-cmd stop
copy
Clear trace buffers
$ sudo trace-cmd clear
copy
Record a trace
$ sudo trace-cmd record
copy
Display recorded trace
$ sudo trace-cmd report
copy

SYNOPSIS

trace-cmd COMMAND [OPTIONS]

DESCRIPTION

trace-cmd is a utility for interacting with the Linux kernel's Ftrace tracing framework. It provides a user-friendly interface for configuring and capturing kernel traces, analyzing function calls, timing, and system events.
The tool supports various tracer plugins including function tracing, function call graphs, and latency tracers for debugging and performance analysis.

PARAMETERS

-p PLUGIN

Specify tracer plugin

COMMANDS

stat

Display tracing system status
start
Start the kernel tracer
stop
Stop the kernel tracer
show
View current trace output
clear
Clear trace buffers
record
Record a trace to file
report
Display recorded trace
list
List available tracers, events, and functions

CAVEATS

Requires root privileges. Tracing can impact system performance. Large traces consume significant memory and storage. Some features depend on kernel configuration.

HISTORY

trace-cmd was created by Steven Rostedt as a front-end for the Linux kernel's Ftrace framework, simplifying the process of kernel tracing and analysis.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community