From owner-freebsd-current Thu Sep 21 17:11:05 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA06083 for current-outgoing; Thu, 21 Sep 1995 17:11:05 -0700 Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA06077 ; Thu, 21 Sep 1995 17:11:01 -0700 Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id RAA00992; Thu, 21 Sep 1995 17:07:03 -0700 From: "Rodney W. Grimes" Message-Id: <199509220007.RAA00992@GndRsh.aac.dev.com> Subject: Re: IP accounting To: gary@palmer.demon.co.uk (Gary Palmer) Date: Thu, 21 Sep 1995 17:07:03 -0700 (PDT) Cc: nathan@netrail.net, questions@freebsd.org, current@freebsd.org In-Reply-To: <3111.811726691@palmer.demon.co.uk> from "Gary Palmer" at Sep 22, 95 00:38:11 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1208 Sender: owner-current@freebsd.org Precedence: bulk > > In message , Nathan Strat > ton writes: > >My only problem is IP accounting I need to know many packets and kbs is > >going out of all my interfaces. Is there any software that will do this? > > netstat -i will tell you packet volumes per interface. If you look at > `man ipfw', and /sys/i386/conf/LINT for details of how to enable it, > you can get more detailed reports. > > As for kilobytes/interface, I dunno if that's possible without using > some sort of packet sniffer. See /usr/include/net/if.h: struct ifnet { ... u_long ifi_oerrors; /* output errors on interface */ u_long ifi_collisions; /* collisions on csma interfaces */ u_long ifi_ibytes; /* total number of octets received */ u_long ifi_obytes; /* total number of octets sent */ u_long ifi_imcasts; /* packets received via multicast */ u_long ifi_omcasts; /* packets sent via multicast */ -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD