Re: cwnd and sstresh monitor




On Thu, 1 Dec 2005, Vlad GALU wrote:

On 12/1/05, Alin-Adrian Anton <aanton@xxxxxxxxxxx> wrote:
Dear Hackers,

        I would like to monitor the changes of cwnd and sstresh values during
TCP traffic, in order to plot graphs and interpret congestion.

        So I need (cwnd, timestamp) and (sstresh, timestamp) records to be
taken everytime one of the two variables is modified.

        I'd like to ask you for suggestions, which would be the best aproach
(kernel patch, kernel module, etc?), and how would this be done best?
(the interception of values, the storage of snapshots, etc)?


Does exporting them via sysctl, and graph them using anything (rrdtool) sound reasonable ?

I've not used it, but there is a TCPDEBUG kernel option that gathers TCP state information for debugging and tracing purposes. I know this has been used quite effectively in the past for this sort of work, but unfortunately I know very little about it. With all the TCP changes in the last few years (SACK, etc), it could be that it needs some enhancements, cleanups, fixes, etc.


In addition, in FreeBSD 6.0, I've added support for a subset of the TCP_INFO API, which allows applications to poll various pieces of TCP connection state information using a socket option, TCP_INFO. Unfortunately, it's polled, not event-driven, so it is possible to miss state transitions.

Another thing that I've been thinking about for a while is adding new KTR(4) traces for TCP events. This would be quite straight forward to do, but is more of a debugging feature than a live real-world use feature, as KTR is more of a debugging trace system. However, it's very easy to instrument new data gathering into KTR -- take a look at the various CTR calls in the kernel, and also at the KTR<->ALQ support that lets KTR dump trace data to a file.

Robert N M Watson
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • TOE brain dump
    ... (TCP Offload Engines). ... functionality in the main kernel, on a separate piece of hardware ... TOE will not be available to projects modifying the stack, ... tied to specific NICs (I've discussed some issues when ...
    (Linux-Kernel)
  • Re: How to tell if a firewall alert is suspicious or not
    ... > WHY this SBCGlobal DNS server would be contacting Adobe Acrobat on port ... They have to parts, a kernel and the userland, in which programs, which are ... With Internet Protocol and TCP it is so, that any network interface in the ... To initiate a TCP connection, first the server has to "listen" on a port. ...
    (comp.security.firewalls)
  • kernel 2.6.18-92.1.6 produces errors when using nfs and nis
    ... kernel 2.6.18-53.1.21.el5, with no change to any conf files when I switch ... The problem is that when the nfs service starts I get the following error ... 100000 2 tcp 111 portmapper ... 100000 2 udp 111 portmapper ...
    (Linux-Kernel)
  • RE: Linux 2.4.27 SECURITY BUG - TCP Local (probable Remote) Denial of Service
    ... > is absolutely nothing the kernel can do about it. ... > It's a resource leak, ... This is how TCP works. ... and read the bug before you comment. ...
    (Linux-Kernel)
  • Re: Setting custom TCP header options
    ... I had a feeling i may need to get into the kernel for ... Tejas Kokje wrote: ... available for the options in the TCP header? ... Even if setsockoptAPI provided a way to set custom TCP option, ...
    (comp.os.linux.networking)