ring_buffer_peek(9)
π 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 vibecpuβ 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 beNULLπ«Ά
π 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:
ring_buffer_event_length(9)ring_buffer_event_data(9)rb_page_capacity(9)rb_subbuf_capacity(9)rb_subbuf_max_data_size(9)rb_subbuf_start(9)ring_buffer_event_time_stamp(9)ring_buffer_nr_dirty_pages(9)ring_buffer_wake_waiters(9)ring_buffer_wait(9)ring_buffer_poll_wait(9)rb_check_pages(9)rb_validate_buffer(9)__ring_buffer_alloc(9)__ring_buffer_alloc_range(9)__ring_buffer_alloc_remote(9)ring_buffer_free(9)ring_buffer_resize(9)rb_update_event(9)ring_buffer_nest_start(9)ring_buffer_nest_end(9)ring_buffer_unlock_commit(9)ring_buffer_lock_reserve(9)ring_buffer_discard_commit(9)ring_buffer_write(9)ring_buffer_record_disable(9)ring_buffer_record_enable(9)ring_buffer_record_off(9)ring_buffer_record_on(9)ring_buffer_record_is_on(9)ring_buffer_record_is_set_on(9)ring_buffer_record_is_on_cpu(9)ring_buffer_record_disable_cpu(9)ring_buffer_record_enable_cpu(9)ring_buffer_oldest_event_ts(9)ring_buffer_bytes_cpu(9)ring_buffer_entries_cpu(9)ring_buffer_overrun_cpu(9)ring_buffer_commit_overrun_cpu(9)ring_buffer_dropped_events_cpu(9)ring_buffer_read_events_cpu(9)ring_buffer_entries(9)ring_buffer_overruns(9)ring_buffer_iter_reset(9)ring_buffer_iter_empty(9)ring_buffer_iter_peek(9)ring_buffer_consume(9)ring_buffer_read_start(9)ring_buffer_read_finish(9)ring_buffer_iter_advance(9)ring_buffer_size(9)ring_buffer_max_event_size(9)ring_buffer_reset_cpu(9)ring_buffer_reset_online_cpus(9)ring_buffer_reset(9)ring_buffer_empty(9)ring_buffer_empty_cpu(9)ring_buffer_swap_cpu(9)ring_buffer_alloc_read_page(9)ring_buffer_free_read_page(9)ring_buffer_read_page(9)ring_buffer_read_page_data(9)ring_buffer_read_page_size(9)ring_buffer_subbuf_size_get(9)ring_buffer_subbuf_order_get(9)ring_buffer_subbuf_order_set(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms