gnet_stats_copy_app(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gnet_stats_copy_app (9) β€” Kernel API Manual

okay so bestie, welcome to the glow-up of <rainbow>gnet_stats_copy_app(9)</rainbow> β€” coming at you straight from the Kernel API Manual, no cap. this is the function that slides your application-specific stats into the statistics TLV, and honestly? it ate. πŸŽ€


✨ NAME ✨

gnet_stats_copy_app β€” copy application specific statistics into statistics TLV πŸ’–

✨ SYNOPSIS ✨

int gnet_stats_copy_app (struct gnet_dump *d , void *st , int len );

✨ ARGUMENTS ✨

  • d β€” the dumping handle 🫢 (your main character struct struct gnet_dump *)
  • st β€” the application specific statistics data ✨ literally the data, bestie
  • len β€” length of data πŸ“

✨ DESCRIPTION ✨

okay so here's the vibe: this function appends the application specific statistics to the top level TLV that was created by gnet_stats_start_copy, and it also remembers the data for XSTATS if the dumping handle happens to be in backward compatibility mode. yes, it's giving thoughtful. it's giving prepared. πŸ’…

Returns 0 on success, or -1 with the statistic lock released if the room in the socket buffer was not sufficient. so like, if there's not enough room in the socket buffer? 🫠 it bails with -1 and the lock is released β€” important detail, don't lose it.

fr fr, remember the lock gets released on that -1 path. that's not a vibe you want to forget at runtime. 😭

✨ SEE ALSO ✨

Kernel file ./net/core/gen_stats.c plus the whole friend group 🌸:


and that's the whole page, bestie πŸ¦‹ mwah πŸ’‹ β€” this one's from ./net/core and it's dated October 2026, so stay iconic and go copy some stats periodt πŸ‘‘

πŸ“¦ where this page comes from