From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 4 22:34:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71B7116A41F for ; Sun, 4 Dec 2005 22:34:31 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from smtpx.spintech.ro (smtpx.spintech.ro [81.180.92.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D2BC43D66 for ; Sun, 4 Dec 2005 22:34:28 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from laura-axiomeda (unknown [11.0.0.25]) by smtpx.spintech.ro (Postfix) with ESMTP id 199E83A4B8 for ; Sun, 4 Dec 2005 22:42:15 +0000 (UTC) X-Laura: version 0.0.1b10-frustratus proxied X-Laura-Remote-IP: 10.0.0.2 Received: from [10.0.0.2] (beastie [10.0.0.2]) by smtpx.spintech.ro (Postfix) with ESMTP id 819E53A4AC for ; Sun, 4 Dec 2005 22:42:14 +0000 (UTC) Message-ID: <43936EEE.80309@spintech.ro> Date: Mon, 05 Dec 2005 00:34:22 +0200 From: Alin-Adrian Anton Organization: Spintech Security Systems User-Agent: Mozilla Thunderbird 1.0 (X11/20041229) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <438F00D8.4040302@spintech.ro> <79722fad0512010559n29e957f5j47c99586ebbd3a0f@mail.gmail.com> <20051201150949.W56270@fledge.watson.org> <4390F425.5060600@spintech.ro> In-Reply-To: <4390F425.5060600@spintech.ro> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: cwnd and sstresh monitor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aanton@spintech.ro List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2005 22:34:31 -0000 Alin-Adrian Anton wrote: > > I used it now, and with a small patch it shows exactly what I need (seq, > ack, timestamp, cwnd and ssthresh). I just added my knob to trpt.c . > > I also modified the iptime() function to provide microsecond resolution > instead of miliseconds, because most of the packets have the same > timestamp attached. Still, a decent number of packets have the same > timestamp. I'm looking at them only on one side of the connection (the > transmitter), I wonder if there is any better solution then timestamping > them on both sides - and mixing the values. > > Thanks guys for the precious information, it helped a lot! > Actually the method above had issues, packets not being logged in the debug buffer (which is limited and gets discarded quickly). Using trpt -f did solve this problem, at the cost of duplicate entries. So what finally did the job was a small "patch" of tcp_debug.c to print on console and print only what is needed (FreeBSD 6.0 won't allow "options TCPCONSDEBUG"), and /var/log/messages was parsed to extract the values. Cheers, -- Alin-Adrian Anton GPG keyID 0x183087BA (B129 E8F4 7B34 15A9 0785 2F7C 5823 ABA0 1830 87BA) gpg --keyserver pgp.mit.edu --recv-keys 0x183087BA "It is dangerous to be right when the government is wrong." - Voltaire