3

When the application does not recv the datagrams fast enough, receive buffer gets exhausted and packets get dropped, incrementing /proc/net/snmp's InErrors counter.

How the receiving application can know that some datagrams are skipped because of the application is itself too slow recv'ing them? Reading /proc/net/snmp from the application is bad idea...

Vi.
  • 37,014
  • 18
  • 93
  • 148
  • 1
    Do you have a sequence number in the datagrams you're receiving ? If not can you add that ? – nos Sep 15 '13 at 21:20
  • 1
    There are multiple sequence numbers and timestamps in the datagrams (the program's job is to test network connection and detect UDP packet loss depending on various rates and packet sizes), but I want to distriminate between packet loss due to networking and due to the receiving program slowness. – Vi. Sep 15 '13 at 21:21
  • There's a SO_RXQ_OVFL socket option you can set, which seems to deliver overflow counters via the socket error queue, and possibly you can read it directly with getsockopt too. Unfortunately I can't find any usable documentation for it... – nos Sep 15 '13 at 21:31

0 Answers0