Subject: Re: How do I get protocol statistics on a per-networking-interface level ?
To: Dheeraj S <dheeraj@ece.gatech.edu>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-net
Date: 04/12/2005 19:52:36
Dheeraj S <dheeraj@ece.gatech.edu> writes:

> On Mon, Apr 11, 2005 at 02:17:51PM -0400, davef1624@aol.com wrote:
> 
> > Can anyone tell me how to get per-protocol based statistics (e.g., for 
> > udp or ip protocols),
> > but on a per-network-interface level?
> > 
> > netstat has the -p <protocol> option, as well as the -I <interface> 
> > option,
> > but it seems that when I use the -p option, the -I option is ignored,
> > and I get stats for all interfaces for the specified protocol.
> > 
> > Am I not using netstat correctly, or are there other tools out there?

c.  The statistics you want are gathered globally, not per interface.

> netstat -I wi0 -p tcp
> 
> works as intended for me.

For me, it prints out the same thing as

netstat -p tcp

This makes sense, given how the statistics are kept, but a) I can't
see how that matches your notion of intended and b) is a bug; using -I
with -p should give an error, since it doesn't print what might
reasonably be expected.

-- 
        Greg Troxel <gdt@ir.bbn.com>