gnet_stats_start_copy(9)
π
gnet_stats_start_copy β it's giving "let's dump some stats" β¨
okay so real talk, this page lives in the Kernel API Manual section 9 (that's the kernel API girlies, not your regular command-line besties) and honestly? she's a whole function and she ATE. let's get into it π
πΈ NAME πΈ
gnet_stats_start_copy β start the dumping procedure in compatibility mode. yes bestie, compatibility mode β she's keeping it cute and backwards-friendly π«Ά
β¨ SYNOPSIS β¨
int gnet_stats_start_copy (struct sk_buff *skb , int type , spinlock_t
*lock , struct gnet_dump *d , int padattr );
like, five args, one int back, no cap. it's giving "simple but she has range" π
π¦ ARGUMENTS π¦
skbβ the socket buffer you're putting your statistics TLVs into. it's the little container of destiny, ngl π¦typeβ the TLV type for the top level statistic TLV. like the big label on the outside of the box, ykwim?lockβ the statistics lock π (yes you gotta grab it, we're being polite and thread-safe)dβ your dumping handle. the main character of this whole operation honestly πpadattrβ the padding attribute. because alignment is self-care β¨
π DESCRIPTION π
so what she actually does: she initializes the dumping handle, grabs the statistic lock, and then appends an empty TLV header to the socket buffer so it can be used as a container for all the other statistic TLVs. like setting up the group chat before you add everyone to it, fr fr π±π¬
and then she tells you how it went: returns 0 on success, or -1 if the room in the socket buffer was not sufficient π (buffer said "no vacancy", and honestly? valid).
β οΈ heads up bestie: check that return value. -1 means the socket buffer didn't have room, and pretending you didn't see it is not the vibe. π
π§ SEE ALSO π§
the whole squad, all in the kernel file ./net/core/gen_stats.c π:
gnet_stats_start_copy_compat(9)gnet_stats_copy_basic(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)
and that's the page!! mwah π this one's sourced from ./net/core and dated October 2026 β so she's fresh, she's iconic, she's the moment. go forth and dump those stats responsibly, bestie ππ
π¦ 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