From owner-freebsd-net@FreeBSD.ORG Thu Aug 22 00:40:53 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB8401AB; Thu, 22 Aug 2013 00:40:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A15A2A13; Thu, 22 Aug 2013 00:40:53 +0000 (UTC) Received: by mail-qc0-f178.google.com with SMTP id s1so649959qcw.37 for ; Wed, 21 Aug 2013 17:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=kTIvIZ51MixjWaQ/QoOqOAnakrsvo5xoAsbMOBi7r6k=; b=k5V47JUBbsoFmdonpf2vib70rMXbmN0YaUvbHi3vPwsdUtvYlWJFbQ8VrvGH+LYkQ9 cYb+gGxk7F+UUpbYxwufYKzqMBgcr/vDyqc2l4b00SUXEUtTS15AK3/cXxDDzAbgYAjm 4QFSlTNeczqJa0hf9dto/0XCh+Leu6FwMfGPyV1UmXwQMSykse3my2VCdv9OXsLIEzBj ovj+d36Uvv681C3EiiVLIT4ok5Ez+np9QxW1n8QJrxR7eEMNIo4lPU8RcOa6yy7G02pc A+uqw4jkK+UCeh56m0r7SRW9kbGnmduczMgjk8mSKtNc+djDAyoIVkI1wyNG3JtwHavG tPAQ== X-Received: by 10.224.3.197 with SMTP id 5mr14289860qao.25.1377132052667; Wed, 21 Aug 2013 17:40:52 -0700 (PDT) Received: from raichu (24-212-218-13.cable.teksavvy.com. [24.212.218.13]) by mx.google.com with ESMTPSA id m10sm14648160qae.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 17:40:51 -0700 (PDT) Sender: Mark Johnston Date: Wed, 21 Aug 2013 20:40:29 -0400 From: Mark Johnston To: Brendan Gregg Subject: Re: DTrace network providers Message-ID: <20130822004029.GA49869@raichu> References: <20130821045926.GA17196@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org, freebsd-dtrace@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Aug 2013 00:40:54 -0000 On Tue, Aug 20, 2013 at 11:44:56PM -0700, Brendan Gregg wrote: > G'Day, > > On Tue, Aug 20, 2013 at 10:00 PM, Mark Johnston wrote: > > > Hello! > > > > I've ported the ip, tcp and udp DTrace providers to FreeBSD, following > > the Solaris documentation here: > > > > https://wikis.oracle.com/display/DTrace/ip+Provider > > https://wikis.oracle.com/display/DTrace/tcp+Provider > > https://wikis.oracle.com/display/DTrace/udp+Provider > > > > > Fantastic! > > > > My implementation of these providers makes use of dynamic translators, > > for which FreeBSD support was added in r254468; this patch won't compile > > with earlier revisions. The use of dynamic translators means that > > existing DTrace scripts which use these providers will just work when run > > on FreeBSD - no modifications needed. In particular, all of the examples > > in the links above will work properly on FreeBSD with my diff. > > > > I've collected a bunch of example scripts for these providers and placed > > them here: > > > > http://people.freebsd.org/~markj/dtrace/network-providers/ > > > > > They look familiar. :-) Which is a good sign for this port, as that's > what's supposed to happen: the same scripts run on any OS. Yep - by "collect" I mostly meant "copied from the DTrace book." :) They were very useful for testing. At first all the examples had to be changed to use the xlate operator on arguments, but now everything just works. > > To run one you just need to execute "dtrace -s