Is there a way to view queue length on listening socket under Linux, the same way as netstat -L
outputs for FreeBSD? I.e. you can see X/Y/Z in netstat -L
output, but netstat under Linux doesn't support -L
flag.
Linux : netstat listening queue length
freebsdlinuxnetstatnetworkingsocket
Related Topic
- Ubuntu – netstat issue: cannot pipe output from ‘netstat -c’ to an nfs mount
- Linux – How to monitor current output/receive queue length in Linux
- Linux – How to change receive queue length of a network interface in Linux
- Netstat Issue – Netstat Shows a Listening Port with No PID but lsof Does Not
- FreeBSD netstat -di, Idrop vs Drop and drop count from NIC or kernel
- Linux – How to Forcibly Close a Socket in TIME_WAIT
- Python reports socket in use, netstat and others claim its not
Best Answer
Let's look into source code, as it's the best documentation in the world of open source.
net/ipv4/tcp_diag.c:
The same thing we can see in unix domain sockets, net/unix/diag.c:
So.
If socket is established, Recv-Q and Send-Q means bytes as it's described in documentation.
If socket is listening, Recv-Q means current queue size, and Send-Q means configured backlog.
Going deeper into mans gives us folowing in sock_diag(7):
In other words,
ss -ln
is the only command you need