LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to tell whether kernel is dropping UDP packets (or size of used receive buffer)? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-tell-whether-kernel-is-dropping-udp-packets-or-size-of-used-receive-buffer-759868/)

igorlord 10-05-2009 02:23 PM

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.

Thanks,

- Igor

madmadmod 10-09-2009 04:57 AM

If you want to see if the netfilter module drops a package you can put "iptables -A MYRULES -j LOG" at the end of your fw chain. This will write a log everytime a package is dropped. to You can also run a "tcpdump -v udp" to see the current UDP traffic.

To see the size of the Maximum Receive Window:

sysctl -a|grep rmem_max

I must say, i don't know how to see the usage of that buffer.

threelions66 10-15-2009 08:26 AM

I would use Wireshark or snort to sniff the traffic


All times are GMT -5. The time now is 11:37 AM.