How to report receive queue size for AF_UNIX sockets

netstatnetworkingsocketunix-sockets

netstat -a reports Recv-Q (amount of unread data pending for a reading application) for AF_INET sockets, but not AF_UNIX sockets (at least not for SOCK_DGRAM).

Does anybody know a way to obtain this information for AF_UNIX sockets from outside of the process itself?

Barring reporting the amount, is there a way to tell if there is any unread data pending for the application.

Best Answer

I figured out a way. On Linux the ss program is kind of like netstat on steroids - it provides much more information, including the amount of data pending in receive buffers for AF_UNIX sockets. I like

ss -ax

for my purposes. Man page: http://man7.org/linux/man-pages/man8/ss.8.html

See also my answer here: How to see the amount of pending data on a unix domain socket?

Also: Intro to SS (some details not found on man page - particularly filters)

Related Question