(linux) tool to monitor "quality" of tcp connection?

How do you define "how fast the packets get delivered" ? If you want to know how much time it takes for a packet to reach point B from point A, then I think it can't be done without sub-millisecond accurate clock synchronization.

What I would try is to capture some real traffic (ie. while actually using your application), and analyze it with WireShark, looking for the delay between some data sent and the corresponding ACK packet. That gives you the round trip time (RTT) for your traffic.

update:

The TCP stack has to keep track of the RTT for each connection. (it's used to optimize packet transmission and manage window size). If you're using Linux, and it's your own application, you can use the getsockopt(fd,.. ,TCP_INFO,...) the data returned includes all this internal parameters. You could peek at this data every second and pipe to a display app.


Sounds like you need iperf.

However, are you sure you're seeing a non-functional link and not TCP stalls in your users connections? Most TCPs will stall if they see three consecutive packet losses.

Are you using the best TCP congestion control your system has? In Windows, you should turn on Compound TCP if you can, in Linux you should probably be using Westwood for this application.


Just FYI.. Linux 'ping' has this option:

-s packetsize
Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.