ring_buffer_peek(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ring_buffer_peek β€” a manual for the girlies (and everyone else, we don't gatekeep)

okay so this is ring_buffer_peek(9), from the Kernel API Manual β€” yes, kernel docs can be cute, we contain multitudes πŸŽ€


✨ NAME ✨

ring_buffer_peek β€” literally just peek at the next event to be read πŸ‘€ no taking, only looking


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ring_buffer_event * ring_buffer_peek (struct trace_buffer *buffer
, int cpu , u64 *ts , unsigned long *lost_events );

bestie, look at that signature. the way she returns a struct ring_buffer_event * and takes four whole arguments? main character energy fr 🌟


🌸 ARGUMENTS 🌸

  • buffer β€” the ring buffer you wanna read, that's the whole vibe
  • cpu β€” which cpu you're peeking at (yes, the original spells it "peak", we're being nice about it πŸ’€)
  • ts β€” the timestamp counter of this event, so you know when it happened ✨
  • lost_events β€” a variable to store if events were lost, and listen, it's got full permission to be NULL 🫢

πŸ’– DESCRIPTION πŸ’–

So what does she actually do? She returns the event that's gonna be read next β€” but she does not consume the data. Not one crumb. It's giving window shopping, not checkout. πŸ›οΈ No cap, you're just looking πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/ring_buffer.c β€” the source herself, iconic 🧚

and her whole friend group, alphabetically-ish in the order the manpage gave us, no gatekeeping:

like, that's a whole group chat right there 😭 every single one of them. go read them. I'll wait πŸ’œ


fr fr though: peek = look, don't touch. if you wanted the data consumed you're in the wrong page, bestie πŸ™ˆ

and that's the whole thing!! brought to you by ./kernel/trace β€” October 2026 β€” and yes, she's still ring_buffer_peek(9) 🩷 slay, stay hydrated, and don't consume the data without reading the docs first πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from