From: Stephen Hemminger <step...@networkplumber.org>
Date: Mon, 26 Feb 2018 13:46:13 -0800

> This is ancient original iproute2 code that dumpster dives into
> slabinfo to get summary statistics on active objects.
> 
>       1) open sockets (sock_inode_cache)

The sockets inuse counter from /proc/net/sockstat is really
sufficient for this.

>       2) TCP ports bound (tcp_bind_buckets) [*]
>       3) TCP time wait sockets (tw_sock_TCP) [*]

Time wait is provided by /proc/net/sockstat as well.

>       4) TCP syn sockets (request_sock_TCP) [*]

It shouldn't be too hard to fill in the last two gaps, maintaining a
counter for bind buckets and request socks, and exporting them in new
/proc/net/sockstat field.

That would be so much better than disabling a useful optimization
in the SLAB allocator.

Thank you.

Reply via email to