From owner-freebsd-hackers@FreeBSD.ORG Mon May 26 15:16:16 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2271065670 for ; Mon, 26 May 2008 15:16:16 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 80C498FC14 for ; Mon, 26 May 2008 15:16:16 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.2) with ESMTP id m4QFGFZ8005098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 26 May 2008 10:16:15 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.2/Submit) id m4QFGFr8005097; Mon, 26 May 2008 10:16:15 -0500 (CDT) (envelope-from dan) Date: Mon, 26 May 2008 10:16:15 -0500 From: Dan Nelson To: Mathieu Prevot Message-ID: <20080526151614.GA5582@dan.emsphone.com> References: <3e473cc60805260752o2f573cf2h12910a45cf6849e6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e473cc60805260752o2f573cf2h12910a45cf6849e6@mail.gmail.com> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: hackers@freebsd.org Subject: Re: network bitrate of a poll of processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2008 15:16:16 -0000 In the last episode (May 26), Mathieu Prevot said: > Hi, > > I would like to know the bitrate of a pool of child processes that use > a network connection, how can I have something like netstat -w1 > provide but at the process level ? If you can segregate them to their own UID, you can use an ipfw "count ip from any to any uid 6666" rule to count the packets. Another option would be to jail them to a dedicated IP address and count traffic on that IP. -- Dan Nelson dnelson@allantgroup.com