gnet_stats_copy_app(9)
π
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 structstruct gnet_dump *)stβ the application specific statistics data β¨ literally the data, bestielenβ 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 πΈ:
gnet_stats_start_copy_compat(9)gnet_stats_start_copy(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_finish_copy(9)
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
- 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