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 likenetstat
on steroids - it provides much more information, including the amount of data pending in receive buffers forAF_UNIX
sockets. I likefor 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)