1
votes

I want to measure UDP latency and drop rate between two machines on Linux. Preferably (but not crucial) to perform measurement between multiple machines at the same time.

As a result I want to get a histogram, e.g. RTT times of each individual packet at every moment during measurement. Expected frequency is about 10 packets per second.

Do you know of any tool that I can use for this purpose?

What I tried so far is:

  1. ping - uses icmp instead of UDP
  2. iperf - measures only jitter but not latency.
  3. D-ITG - measures per flow statistics, no histograms
  4. tshark - uses TCP for pings instead UDP
  5. I have also created a simple C++ socket program where I have Client and Server on each side, and I send UDP packets with counter and timestamp. My program seems to work ok, although since I am not a network programmer I am not 100% sure that I handled buffers correctly (specifically in the case of partial packets etc). So I would prefer to use some proven software for this task.

Can you recommend something?

Thanks

2

2 Answers

1
votes

It depends. If all you want is a trace with timestamps, Wireshark is your friend: https://www.wireshark.org/

1
votes

I would like to remind you that UDP is a message based protocol and packets have definite boundaries. There cannot be reception of partial packets. That is, you will either get the complete message or you will not get it. So, you need not worry about partial packets in UDP.

The method of calculating packet drop using counter & calculating latency using time delta appears fine for UDP. However the important point to be taken in to consideration is ensuring the synchronization of the system time of client and server.