Subject: Re: getting the bytes that pass an network interface?
To: David Wetzel <dave@turbocat.de>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: netbsd-help
Date: 05/05/1999 09:48:26
On Wed, May 05, 1999 at 12:54:19PM +0200, David Wetzel wrote:
> > From: "Jake J Sadowski" <austran@earthlink.net>
> 
> > Try netstat -i, it will show you all interfaces. Check the netstat man page
> > for all options.
> 
> If I understand the man right, that numbers are packets. But ethernet  
> packets are not all the same (data)size.

  Try netstat -i -b (as documented in the man page)!  For a
single interface, use "netstat -b -I <iface>".  Here's sample output:

% netstat -ib
Name  Mtu   Network       Address               Ibytes     Obytes
we0   1500  <Link>        00:00:c0:84:84:8b  539467677  255418727
we0   1500  128.83.52/24  marvin.ece.utexas  539467677  255418727
lo0   32976 <Link>                            17356832   17356832
lo0   32976 your-net      localhost           17356832   17356832
...

% netstat -b -I we0
Name  Mtu   Network       Address               Ibytes     Obytes
we0   1500  <Link>        00:00:c0:84:84:8b  540102217  255929648
we0   1500  128.83.52/24  marvin.ece.utexas  540102217  255929648

  Brian