How to tell whether kernel is dropping UDP packets (or size of used receive buffer)?
I have an application that is receiving UDP (datagram) packets. I have a socket and have specified some (512K) size for its receive buffer.
I am receiving the packets at some rate, but I want to know whether I am catching up or not. Hence, I would like to find out, from which the application, either whether the kernel is dropping incoming UDP packets (due to me not catching up) or at least the size of the receive buffer used/free (I understand that my receive buffer can be used by multiple backloged UDP packets, is that correct?).
If it matters, I can arrange for my application to run as root.