From owner-freebsd-hackers@FreeBSD.ORG Mon May 26 16:14:19 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 2D1741065675 for ; Mon, 26 May 2008 16:14:19 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.232]) by mx1.freebsd.org (Postfix) with ESMTP id 72D3E8FC24 for ; Mon, 26 May 2008 16:14:18 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by hu-out-0506.google.com with SMTP id 34so3043773hue.8 for ; Mon, 26 May 2008 09:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vplZCM1mUkL/HSyJKE3kN/boO6xRuwDG+rZaG+U3wJA=; b=QS5Em+qGyJ7vN9rM8xR8kObKQneed2Fc+sX4T7A0rqYFqJNPJCktPnD9kFVxgLYxMkcUlf2hmMvA8HZi+5+zEGATL4z8xWpLLWug19U2d8KXIjefnqG1ApUHybrcKjCyDM4SJ2xsf+Clxir3sm5wqGgQQsQAsTBK818Y3axrG1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uQAaMN+/gMzwjVSsLGwIKhw6mw6H27OWAFu/27lrmmHtqcIHxJ2hE6bT13ayqecSZ0QCwuVJAd4ioXZQJEw7hZXOT7UkGt6k6dqjCD3nDOwPwKWqOMtHoAdFB2jrSY1XbBMQyGIpgqlHU1ZKo+KTvtwzwBQrtcmqLTlj1iMTVlY= Received: by 10.82.118.1 with SMTP id q1mr171649buc.52.1211818454183; Mon, 26 May 2008 09:14:14 -0700 (PDT) Received: by 10.82.170.10 with HTTP; Mon, 26 May 2008 09:14:14 -0700 (PDT) Message-ID: <3e473cc60805260914r537f113eh8d840a94c0a5d958@mail.gmail.com> Date: Mon, 26 May 2008 18:14:14 +0200 From: "Mathieu Prevot" To: "Dan Nelson" In-Reply-To: <20080526151614.GA5582@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3e473cc60805260752o2f573cf2h12910a45cf6849e6@mail.gmail.com> <20080526151614.GA5582@dan.emsphone.com> 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 16:14:19 -0000 2008/5/26 Dan Nelson : > 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. Both are nice... thank you. And don't you have something more portable ie. that could run on "any" posix os - like a sh script that use standard tools - and that doesn't need root user intervention ? Mathieu