gnet_stats_copy_basic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gnet_stats_copy_basic ✨

okay bestie, welcome to the Kernel API Manual page for gnet_stats_copy_basic(9) β€” yes it's a mouthful, yes it's iconic, let's get into it πŸŽ€

🌸 NAME 🌸

gnet_stats_copy_basic β€” copy basic statistics into statistic TLV πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

int gnet_stats_copy_basic (struct gnet_dump *d , const struct
gnet_stats_basic_sync __percpu *cpu , const struct gnet_stats_basic_sync
*b , bool running );

πŸ’– ARGUMENTS πŸ’–

  • d β€” the dumping handle, your main character of the moment ✨
  • cpu β€” copy statistic per cpu, okay so it's giving per-CPU energy 🧚
  • b β€” basic statistics, the actual data bestie πŸ“
  • running β€” true if b represents a running qdisc, thus b's internal values might change during basic reads. Only used if cpu is NULL πŸ‘‘

⭐ CONTEXT ⭐

task; must not be run from IRQ or BH contexts 😭 like literally do not, iykyk

πŸ”₯ DESCRIPTION πŸ”₯

Appends the basic statistics to the top level TLV created by gnet_stats_start_copy. no cap, that's the whole vibe 🫢

Returns 0 on success or -1 with the statistic lock released if the room in the socket buffer was not sufficient. so if the socket buffer is out here being too small, you get -1 and the lock gets released β€” noted πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./net/core/gen_stats.c gnet_stats_start_copy_compat(9), gnet_stats_start_copy(9), gnet_stats_copy_basic_hw(9), gnet_stats_copy_rate_est(9), gnet_stats_copy_queue(9), gnet_stats_copy_app(9), gnet_stats_finish_copy(9) β€” go read the whole friend group, they all slay πŸ‘‘


and that's the page bestie!! πŸŽ€ this one's straight out of ./net/core, dated October 2026, and it's literally the gnet_stats_copy_basic(9) man page β€” obsessed, periodt πŸ’œπŸ¦‹

πŸ“¦ where this page comes from