Maybe ss (socket statistics) available in iproute utilities can help you with this.
# ss -i 'src 1.1.1.1:1234 and dst 2.2.2.2:1234' State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 1.1.1.1:1234 2.2.2.2:1234 reno wscale:2,7 rto:3380 rtt:855/602.5 ato:40 ssthresh:2 send 27.3Kbps rcv_space:5840
If you need more information on the rtt field, I think that it is best to take a look at ss.c.
source share