=====Contents=====
* [[https://www.linuxfoundation.org/#TCP_Probe|1 TCP Probe]]
* [[https://www.linuxfoundation.org/#Usage|1.1 Usage]]
* [[https://www.linuxfoundation.org/#Examples|1.2 Examples]]
* [[https://www.linuxfoundation.org/#Results|1.3 Results]]
* [[https://www.linuxfoundation.org/#See_Also|1.4 See Also]]
====== 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 using[[http://www-128.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw961Kprobe|kprobe]] 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 <=2147483647 ? 0 : \$8) title "snd_ssthresh"
EOF
==== Examples====
An example is this graph created using [[https://www.linuxfoundation.org/node/add/wiki?gids[]=5066| netem ]] to emulate
a 100Mbit connection with 700ms of delay.{{https://wiki.linuxfoundation.org/images/0/05/Cubic.png?nolink|}}
==== Results====
See [[http://developer.osdl.org/shemminger/tcp|[1]]] for more TCP test results.
==== See Also====
* [[http://www.isi.edu/nsnam/ns|ns2]] network simulator
* [[http://www.web100.org|Web100 project]] instrumentation
* [[http://tcng.sourceforge.net/#tcsim|Tcsim]] simulate TCP under UML