From owner-freebsd-net@FreeBSD.ORG Thu Apr 30 12:58:50 2015 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF44DD50 for ; Thu, 30 Apr 2015 12:58:50 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABCF61593 for ; Thu, 30 Apr 2015 12:58:50 +0000 (UTC) Received: from global-1-26.nat.csx.cam.ac.uk ([131.111.184.26]:10892 helo=[172.16.33.1]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1Yno3F-0005kA-FD for net@freebsd.org; Thu, 30 Apr 2015 08:58:49 -0400 From: "George Neville-Neil" To: net@freebsd.org Subject: SIFTR and DTrace Date: Thu, 30 Apr 2015 13:58:48 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 12:58:50 -0000 Howdy, I have added support for a DTrace SDT to the SIFTR module in HEAD. What this means is that you can now get SIFTR data filtered out of the kernel directly. I also added a simple script (share/dtrace/siftr) to show how this works. The test script is very wordy and only an example of how to use this. In order to use SIFTR with DTrace either load the modules, dtraceall and siftr, or compile them into the kernel. Here is some example output: sudo ./siftr direction in state state-established local 22 remote 55907 snd_cwnd 22978 snd_wnd 131008 rcv_wnd 66608 snd_bwnd 0 snd_ssthresh 1073725440 max_seg_size 1448 smoothed_rtt 11 sack_enabled 1 snd_scale 5 rcv_scale 6 flags 0x3e4 rxt_length 230 snd_buf_hiwater 33304 snd_buf_cc 0 rcv_buf_hiwater 66608 rcv_buf_cc 0 sent_inflight_bytes 0 t_segqlen 0 flowid 0 flowtype 0 Using a DTrace predicate you can select a particular flow based on, for instance, the local and remote ports. I have not put in the IP address reporting as yet nor have I added the ability to pull out the timeval recorded by SIFTR. Since the trace point is in the code where the trace is taken it is possible to use DTrace timestamps natively. Best, George