Apache Traffic Server TCP info plugin

This plugin was written to log client round trip times.  This
information is retrieved from the getsockopt() function using the
TCP_INFO option.  Other information can also be gathered from TCP_INFO
and there is an option to log most of the data structure.


Configuration:
The configuration files default location is in the etc or
configuration directory under the default install directory.  For
example if your installation directory is "/usr/local", then the
plugin will first look in "/usr/local/etc" and then in
"/usr/local/conf" for the configuration file.  The configuration
filename is "tcp_info.config".


--------------------------------------------------------------------------------
Configuration Options:

"sample" is the number of times per 1000 requests that the data will
be logged.  A pseudo-random number generator is used to determine if a
request will be logged.  The default value is 1000 and this option is
not required to be in the configuration file.  To achieve a log rate
of 1% you would set this value to 10.
example:
sample=1000

"log_file" is the full path to the log file.  There is no default
value and this option is required to be set in the config file.  If
the plugin can't open the log file the plugin will assert.
example:
log_file=/usr/local/var/log/trafficserver/tcp_info.log

"log_level" determines how much information you want in the log file.
The default is 1 and this option is not required to be in the config
file.  Log level of 1 will only log the rtt value from the TCP_INFO
data structure.  To log most of the TCP_INFO data structure use the
value of 2.
example:
log_level=1


*** "hook" DOESN'T WORK RIGHT NOW - ATS NEEDS ANOTHER HOOK BEFORE CLOSING THE SOCKET ***
"hook" tells the plugin when to log the information.  The default is 1
and this will log the TCP_INFO data when the client makes a TCP
connection.  A value of 2 will log the information at the end of the
TCP connection.  If you are looking for information about retransmit
or lost, then you most likely would want to set this to 2.  This
configuration option is not required to be in the config file.
example:
hook=1

--------------------------------------------------------------------------------
Log Format:

log_level=1
[unix seconds] [client ip] [server ip] [rtt]
example:
1344483780 192.168.1.12 192.168.1.1 1875

log_level=2
[unix seconds] [microseconds] [client ip] [server ip] [last_data_sent]
[last_data_recv] [snd_cwnd] [snd_ssthresh] [rcv_ssthresh] [rtt]
[rttvar] [unacked] [sacked] [lost] [retrans] [fackets]


example:
1344483817 281068 192.168.1.12 192.168.1.1 2 2 10 2147483647 32768 3875 4500 0 0 0 0 0

--------------------------------------------------------------------------------
Version 1.0.1 (8/9/2012, bcall)
  * Documentation and code cleanup

Version 1.0.0 (8/8/2012, bcall)
  * Initial Version
