From owner-cvs-all@FreeBSD.ORG Sun Jul 24 17:25:08 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E342016A41F; Sun, 24 Jul 2005 17:25:08 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B035143D45; Sun, 24 Jul 2005 17:25:08 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from freefall.freebsd.org (csjp@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6OHP8CH038063; Sun, 24 Jul 2005 17:25:08 GMT (envelope-from csjp@freefall.freebsd.org) Received: (from csjp@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6OHP8mA038062; Sun, 24 Jul 2005 17:25:08 GMT (envelope-from csjp) Date: Sun, 24 Jul 2005 17:25:08 +0000 From: "Christian S.J. Peron" To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20050724172508.GA15547@freefall.freebsd.org> References: <200507241721.j6OHLImZ032073@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507241721.j6OHLImZ032073@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: cvs commit: src/sys/net bpf.c bpfdesc.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2005 17:25:09 -0000 On Sun, Jul 24, 2005 at 05:21:18PM +0000, Christian S.J. Peron wrote: > csjp 2005-07-24 17:21:18 UTC > > FreeBSD src repository > > Modified files: > sys/net bpf.c bpfdesc.h > Log: > Introduce new sysctl variable: net.bpf.stats. This sysctl variable can > be used to pass statistics regarding dropped, matched and received > packet counts from the kernel to user-space. While we are here > introduce a new counter for filtered or matched packets. We currently > keep track of packets received or dropped by the bpf device, but not > how many packets actually matched the bpf filter. > I have a userspace program to display these stats: http://people.freebsd.org/~csjp/bpfstat.1122182321.shar An example of the output is: $ bpfstat pid netif flags recv drop match sblen hblen command 10750 rl0 p--s- 260 0 260 2426 0 tcpdump $ I plan to move this into base, but I would like some people to test/review it first. -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer