From owner-freebsd-net@freebsd.org Mon May 30 00:02:23 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A749AB54BFE for ; Mon, 30 May 2016 00:02:23 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 99F2718ED for ; Mon, 30 May 2016 00:02:23 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yuri.doctorlan.com (c-24-5-143-190.hsd1.ca.comcast.net [24.5.143.190]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id u4U02HmX097159 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 29 May 2016 17:02:17 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-5-143-190.hsd1.ca.comcast.net [24.5.143.190] claimed to be yuri.doctorlan.com To: freebsd-net@freebsd.org From: Yuri Subject: Is there a way to keep an account of which processes generate how much network traffic? Message-ID: Date: Sun, 29 May 2016 17:02:16 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 00:02:23 -0000 There is vnstat that does this by interface. But is there a way to do this by the application? This is because nearly every packet that is sent through the system is sent on behalf of some process running on the system. It would be nice to be able to see which applications (in general sense) generate most traffic. I am fully aware that the link between pid and an "application" is vague because some processes are run through some cryptic command lines. I am just interested if anything exists in this area at all. Yuri