reset-trace(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ reset-trace(8) πŸŽ€

✨ NAME ✨

reset-trace - reset the state of tracing. πŸ’–

🧚 SYNOPSIS 🧚

reset-trace [-F] [-h] [-q] [-v]

πŸ’… DESCRIPTION πŸ’…

okay so bestie, you will probably never need this tool πŸ™ˆ but lowkey it's a lifesaver. if you kill -9 a bcc tool (or hit it with other signals, like SIGTERM), or if a bcc tool just crashes, kernel tracing can get stuck in a semi-enabled state. it's not as dramatic as it sounds ngl: there might just be extra overhead from writing to ring buffers that nobody ever reads 🫢 this tool cleans up the tracing state, and resets and disables any active tracing. iconic behavior honestly.

🚨 Make sure no other tracing sessions are active before you run this! It might stop them from working, and maybe not gracefully 😭

this one specifically clears the state in at least these files in /sys/kernel/debug/tracing: kprobe_events, uprobe_events, and trace_pipe. ✨ other tracing facilities (ftrace) get checked too, and if they're not in an expected state, it prints a note for you. you can reset all tracing files with -F (force), but that will interfere with any other running tracing sessions (eg, ftrace) πŸ’€

🌸 REQUIREMENTS 🌸

/sys/kernel/debug mounted as debugfs πŸ¦‹

πŸ‘‘ OPTIONS πŸ‘‘

  • -F β€” Force! πŸ”₯ This resets all tracing facilities, including the ones bcc doesn't use (ftrace). you really shouldn't need this one, bestie.
  • -h β€” shows the USAGE message πŸ’œ
  • -q β€” Quiet mode 🀫 no output while it's working.
  • -v β€” Verbose πŸ—£οΈ it tells you what it's doing as it goes.

πŸ“ EXAMPLES πŸ“

Reset the state of tracing:

# reset-trace

Verbose:

# reset-trace -v

🌈 SOURCE 🌈

this is from bcc, obviously πŸ₯°

https://github.com/iovisor/bcc

also look in the bcc distribution for a companion _examples.txt file with example usage, output, and commentary for this tool πŸ“šβœ¨

🌍 OS 🌍

Linux 🐧

⭐ STABILITY ⭐

Unstable - still in development 🚧 so vibe check before you rely on it.

πŸ¦‹ AUTHOR πŸ¦‹

Brendan Gregg πŸ‘‘


bestie, that's the whole page πŸ’– it's from the USER COMMANDS section, dated 2016-10-18, and I'm obsessed that you made it this far 🫢✨