STRUCT TRACE_BUFFER_META(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct trace_buffer_meta (9) β€” like, the Kernel API Manual page, bestie πŸŽ€

okay so picture this: it's giving Ring-buffer Meta-page description. that's the whole vibe. ✨


πŸ’– NAME πŸ’–

struct trace_buffer_meta β€” the ring-buffer meta-page description, and yes it's exactly as iconic as it sounds 🫢


🌸 SYNOPSIS 🌸

struct trace_buffer_meta {
    __u32 meta_page_size;
    __u32 meta_struct_len;
    __u32 subbuf_size;
    __u32 nr_subbufs;
    struct {
      __u64 lost_events;
      __u32 id;
      __u32 read;
    } reader;
    __u64 flags;
    __u64 entries;
    __u64 overrun;
    __u64 read;
    __u64 pages_lost;
    __u64 pages_touched;
 };

like, that's the whole struct. no cap, that's it πŸ’…


πŸ¦‹ Members πŸ¦‹

okay bestie, field-by-field, let's go πŸ‘‘

  • meta_page_size β€” the size of this meta-page. that's the number, periodt ✨
  • meta_struct_len β€” the size of this structure itself. self-aware king 🌈
  • subbuf_size β€” the size of each sub-buffer πŸ’œ
  • nr_subbufs β€” the number of subbfs in the ring-buffer, including the reader. (yes, "subbfs" β€” we don't edit the source, we respect the source 😭)
  • reader β€” the reader composite info structure, a little struct inside the struct, main character energy πŸŽ€
    • reader.lost_events β€” number of events lost at the time of the reader swap πŸ’€
    • reader.id β€” subbuf ID of the current reader. ID range [0 : nr_subbufs - 1] ⭐
    • reader.read β€” number of bytes read on the reader subbuf πŸ“
  • flags β€” placeholder for now, 0 until new features are supported. it's lowkey just vibing there πŸ™ˆ
  • entries β€” number of entries in the ring-buffer πŸ”₯
  • overrun β€” number of entries lost in the ring-buffer 😭
  • read β€” number of entries that have been read πŸ‘‘
  • pages_lost β€” number of pages overwritten by the writer πŸ’…
  • pages_touched β€” number of pages written by the writer ✨

🌟 SEE ALSO 🌟

  • Kernel file ./include/uapi/linux/trace_mmap.h β€” go read it, iykyk 🧚

πŸ’– friendly reminder bestie: flags is literally a placeholder for now, 0 until new features are supported β€” so don't go building your whole personality on it yet 🫢

and that's a wrap, gorgeous ✨ this little gem lives in ./include/uapi/linux, dated October 2026 β€” so like, slightly future-core of it, and honestly? slay. πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from