gnet_stats_finish_copy(9)
π gnet_stats_finish_copy(9) π
okay so bestie, welcome to the Kernel API Manual β this page is all about gnet_stats_finish_copy(9), and it's literally the cleanup era of the dumping saga. β¨
β¨ NAME β¨
gnet_stats_finish_copy β the function that finishes the dumping procedure. no cap, it's the final boss of the dump. π
π SYNOPSIS π
int gnet_stats_finish_copy (struct gnet_dump *d );
πΈ ARGUMENTS πΈ
dβ the dumping handle. it's giving βhold my stats while I finish this.β π
β¨ DESCRIPTION β¨
okay so here's the tea: gnet_stats_finish_copy corrects the length of the top level TLV so it includes all the TLVs that were added by gnet_stats_copy_XXX calls. π«Ά
It also adds the backward compatibility TLVs if gnet_stats_start_copy_compat was used, and then it releases the statistics lock. iconic behavior, honestly. π₯
Return value check, bestie: you get 0 on success. but if the room in the socket buffer was not sufficient, you get -1 with the statistic lock released. π so yeah, -1 means no room and the lock is already out the door. π
π¦ SEE ALSO π¦
Kernel file ./net/core/gen_stats.c β and the whole squad:
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_copy_app(9)
mwah π β source/version: ./net/core, date: October 2026, page: gnet_stats_finish_copy(9). bye bestie, go finish that dump π«Άβ¨
π¦ 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