TRACE-CMD-SHOW(1)

๐ŸŒธ TRACE-CMD-SHOW(1) โ€” the libtracefs manual, but make it make sense ๐Ÿ’…

okay bestie, so this is the page for trace-cmd-show from the libtracefs manual, and honestly? it's a whole vibe check on your kernel's tracing buffer. let's go โœจ


๐ŸŽ€ NAME ๐ŸŽ€

trace-cmd-show โ€” literally just shows you the contents of the Ftrace Linux kernel tracing buffer. that's it. that's the job. iconic behaviour, no notes ๐Ÿ’–


โœจ SYNOPSIS โœจ

trace-cmd show [OPTIONS]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so trace-cmd(1) show displays the contents of one of the Ftrace Linux kernel tracing files: trace, snapshot, or trace_pipe. ngl it's basically the same energy as doing:

cat /sys/kernel/debug/tracing/trace

likeโ€ฆ yes queen, that's the whole concept ๐Ÿซถ


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -p โ€” instead of showing you the contents of the trace file, it hits up the trace_pipe file instead. the difference between the two? the trace file is static. meaning if tracing is stopped, trace gives you the exact same contents every single time you look at it. like a screenshot ๐Ÿ“ธ

trace_pipe is a consuming read though โ€” the way that reading it eats the output of what you read, so you won't get the same thing a second time even if tracing is stopped. it will also block. if there's no data available, trace-cmd show will stop and wait for data to show up ๐Ÿ˜ญ bestie she waits.

  • -s โ€” instead of reading the trace file, read the snapshot file. a snapshot gets made when an application writes into it and the kernel does a swap between the currently active buffer and the current snapshot buffer. if no more swaps happen, the snapshot stays static. this one is not a consuming read, so you can look at it again and again, main character energy ๐Ÿ‘‘
  • -c cpu โ€” read only the trace file for a specified CPU.
  • -f โ€” display the full path name of the file that's being displayed. very "here's my source, iykyk" ๐Ÿ’…
  • -B buf โ€” if a buffer instance was created, the -B option accesses the files associated with the given buf. go get your buffer's files, bestie.
  • --tracing_on โ€” show if tracing is on for the given instance.
  • --current_tracer โ€” show what the current tracer is.
  • --buffer_size โ€” show the current buffer size (per-cpu).
  • --buffer_total_size โ€” show the total size of all buffers. all of them. the whole squad ๐ŸŒˆ
  • --buffer_subbuf_size โ€” show the size in kilobytes of the sub-buffers of the ring buffer. so here's the lore: the ring buffer is broken up into equal size sub-buffers, where an event can only be as big as the sub-buffer data section (that's the size minus its meta data). no cap.
  • --buffer_percent โ€” show the percentage the buffer must be filled before a reader that's blocked on the trace_pipe_raw file gets woken up:
0       : wake up immediately on any new data
1 - 99  : wake up on this percentage of the sub-buffers being full
100     : wake up after the buffer is full and the writer is on the last sub-buffer

pick your fighter ๐ŸฅŠ

  • --ftrace_filter โ€” show what function filters are set.
  • --ftrace_notrace โ€” show what function disabled filters are set.
  • --ftrace_pid โ€” show the PIDs the function tracer is limited to (if any). if any!! sometimes it's just vibes.
  • --graph_function โ€” show the functions that will be graphed.
  • --graph_notrace โ€” show the functions that will not be graphed. they're on the do-not-call list ๐Ÿ™ˆ
  • --hist [system:]event โ€” show the content of a histogram hist file for a given event.
  • --trigger [system:]event โ€” show the content of the trigger file for a given event.
  • --cpumask โ€” show the mask of CPUs that tracing will trace. the chosen ones โœจ
fr fr: none of these are dangerous, they're all just reading. you're literally just looking at files, bestie. you got this ๐Ÿซถ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1), trace-cmd-list(1), trace-cmd-listen(1)

the whole friend group. read them all, slay ๐Ÿ’œ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Steven Rostedt, <rostedt@goodmis.org[1]> โ€” the legend himself, we stan ๐Ÿซก


โญ RESOURCES โญ

https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/

go look, it's giving open source excellence ๐Ÿงš


๐ŸŒธ COPYING ๐ŸŒธ

Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL). periodt. ๐Ÿ’–


๐Ÿ“ NOTES ๐Ÿ“

  1. rostedt@goodmis.org mailto:rostedt@goodmis.org

aaaand that's the page!! this one came to you from libtracefs, dated 03/09/2026 โ€” so if you're reading this from the future, hi bestie, hope your buffers are fresh ๐ŸŒˆ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from