Linux console tool to evaluate round trip latency within a TCP/UDP session?

For the life of me, I saw a tool in the last few weeks somewhere and I forgot to bookmark it. This isn't a ping or traceroute or iperf tool.

Wireshark might do this, but I am pretty sure I saw a black and white console example where the tool evaluated the sub-second timings between when a packet leaves and it's response comes back. Probably by setting a series of filters for interesting traffic.

A couple of examples come to mind:

1) evaluating dns queries: when people complain their 'internet is down', it isn't because they are disconnected, it can be due to dns queries timing out. Or being slow. And in some diagnostic scenarios, it is interesting to see what queries are slow and what queries are fast, and what the difference is.

2) Web browsing: what are the timings of the setup of the three way tcp handshake? This gets a relative idea of latency to the server. Then what is the timing of requesting an http header and it's response... which provides an idea of latency further up the stack.

Then I suppose, an open question, what do people use to measure these sorts of things?

  • The kernel keeps RTT estimates already. Try "ip tcp_metrics" with the iproute2 package installed (it usually is by default these days)

  • mtr?