[erlang-questions] socket getsockopt PACKET_STATISTICS

Max Lapshin max.lapshin@REDACTED
Wed Oct 5 09:50:10 CEST 2016


Hi.


I want to get statistics for dropped packets on udp socket.

Right now I open on linux /proc/net/udp and read it once per second and
parse.

It is not very reliable, because if there are two multicast listeners on
same group:port, it is impossible to distinguish them.


Seems that it is possible to query PACKET_STATISTICS via getsockopt, but
this is supported only in Linux.


Will such platform specific patch to OTP be accepted, if I add to
inet:getstat/1  something like drop_cnt response that will work only under
linux?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161005/008cb16e/attachment.htm>


More information about the erlang-questions mailing list