User Tools

Site Tools


networking:tcpprobe

Contents

TCP Probe

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 usingkprobe so that the congestion window and sequence number can be captured.

Usage

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

Examples

An example is this graph created using netem to emulate a 100Mbit connection with 700ms of delay.

Results

See [1] for more TCP test results.

See Also

networking/tcpprobe.txt · Last modified: 2016/07/19 01:22 (external edit)