TCP probe is a module that records the state of a TCP connection in response to incoming packets. It works by inserting a hook into the tcp_recv processing path using kprobe  so that the congestion window and sequence number can be captured.
For example, to test with iperf
# modprobe tcp_probe port=5001 # cat /proc/net/tcpprobe >/tmp/data.out & # pid=$! # iperf -c otherhost # kill $pid
The data collected in the above example can be plotted with a simple script like
#! /bin/bash gnuplot -persist <<EOF set data style linespoints show timestamp set title "$1" set xlabel "time (seconds)" set ylabel "Segments (cwnd, ssthresh)" plot "$1" using 1:7 title "snd_cwnd", \\ "$1" using 1:(\$8>=2147483647 ? 0 : \$8) title "snd_ssthresh" EOF
An example is this graph created using netem  to emulate
a 100Mbit connection with 700ms of delay.
See   for more TCP test results.