Linux – How to list all requests to udp sockets

linuxnetworkingpacket-analyzerudp

I'm operating a couple of server daemons that use udp to communicate with large number of clients. How do I find and list out all the active udp "connections" that are talking to the servers in order to estimate the num of active clients that are connected to the server daemons? I couldn't think of an easy way to do this besides sniffing the packets with tshark or tcpdump and look at the source ip of udp packets going to the server daemons and yes, I know UDP is connectionless and stateless protocol.

Best Answer

UDP is a stateless protocol - so, no states.

To see what's listening for UDP:

netstat -lnpu

The equivalent command on modern linux:

ss -lnpu
Related Topic