trace-cmd-list
List available trace events
TLDR
List available tracers
List available plugins
List available events
List available functions
SYNOPSIS
trace-cmd list [options]
trace-cmd list
trace-cmd list -e [system][:event]
trace-cmd list -f
trace-cmd list -s
PARAMETERS
-e, --events
Lists available ftrace event systems and their individual events. If a system is specified (e.g., -e syscalls), it lists events only for that system. If an event is also specified (e.g., -e syscalls:sys_enter_open), it checks if that specific event exists.
-f, --functions
Lists available ftrace filter functions that can be applied to trace events.
-s, --stats
Lists available ftrace statistics that can be monitored.
DESCRIPTION
The trace-cmd list command is a fundamental subcommand of the trace-cmd utility, designed for interacting with the Linux kernel's powerful ftrace tracing framework. Its primary purpose is to provide an exhaustive enumeration of the various tracing capabilities and points available on a given system. This command is crucial for users to understand what kernel tracing options are at their disposal before initiating a trace.
Specifically, trace-cmd list can display:
- Available Tracers: Without any options, it lists the different tracing mechanisms (e.g., function, nop, irqsoff, wakeup) that ftrace can utilize to capture data. The output clearly indicates which tracers are currently active or compiled into the running kernel.
- Available Event Systems and Events: Using the -e option, it shows a hierarchical view of kernel event systems (such as syscalls, sched, block, net) and the specific tracepoints (events) defined within each system. This allows users to pinpoint precise kernel activities they wish to monitor.
- Available Filter Functions: With the -f option, it lists functions that can be used for advanced filtering of trace data.
- Available Statistics: The -s option displays various statistics counters provided by ftrace.
CAVEATS
The output of trace-cmd list is entirely dependent on your Linux kernel's configuration and compiled-in ftrace capabilities. If certain tracers, event systems, or features are not enabled or built into your kernel, they will not appear in the list or might be shown as unavailable. Listing all events with trace-cmd list -e (without specifying a system) can produce extremely long output, potentially making it difficult to parse manually. It's often more efficient to pipe the output to a pager like less or grep for specific entries.
INTERPRETING TRACER OUTPUT
When trace-cmd list is executed without any options, it displays a list of kernel tracers. A tracer name enclosed in square brackets, such as [function], signifies that this particular tracer is currently available and enabled within your running kernel. If a tracer name is shown without brackets (e.g., nop), it means the tracer is recognized by trace-cmd but is not presently available or compiled into your kernel's configuration.
INTERPRETING EVENT OUTPUT
When using trace-cmd list -e, the output presents event systems and their corresponding events. Each event is typically formatted as system:event_name (e.g., syscalls:sys_enter_open). This precise format is crucial for enabling specific events during trace recording, for instance, when using commands like trace-cmd record -e syscalls:sys_enter_open.
HISTORY
The trace-cmd utility, including its crucial list subcommand, was primarily developed by Steven Rostedt, a key maintainer of the Linux kernel's ftrace framework. Its inception aimed to provide a more user-friendly and robust interface to ftrace, simplifying complex kernel tracing operations that previously required direct, intricate interactions with debugfs files. The list subcommand has been a fundamental component since the early stages of trace-cmd's development, as it is essential for users to discover and verify available tracing points on their system before initiating any trace analysis.
SEE ALSO
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1)