Re: [PATCH net-next] tcp: export drops counter to /proc/net/tcp{,6}

From: StÃphan Gorget
Date: Fri Aug 18 2017 - 08:51:36 EST


On 8/18/17 1:14 PM, Eric Dumazet wrote:
> On Fri, 2017-08-18 at 03:21 -0700, StÃphan Gorget wrote:
>> Those counters are exported for raw and udp but not for tcp, though they
>> are incremented.
>>
>> An example where it is useful is chasing listen overflow. Listen overflow
>> are counted as a global counter in LINUX_MIB_LISTENOVERFLOWS accessible
>> in /proc/net/netstat but there is no way to find related drops in the
>> information exported for tcp. With this patch it will make possible to
>> correlate growth of LINUX_MIB_LISTENOVERFLOWS with growth of drops for
>> a tcp socket.
>
> Simply use iproute2/ss tool to access this information in a very
> efficient way (like filtering done in the kernel, instead having to
> parse a gigantic /proc output)
>
> lpaa5:~# ss -tm state listening src :22

Thanks for the quick response, I'll use ss with those options that's
exactly what I needed.