Subject: Re: network byte transfer stats
To: Ross Harvey <ross@teraflop.com>
From: Kevin M. Lahey <kml@nas.nasa.gov>
List: tech-kern
Date: 10/22/1997 22:28:34
In message <199710230245.TAA21245@delta.ghs.com>Ross Harvey writes
>Digital Unix keeps track of the byte counts transferred in each direction
>on network interfaces. I can't find anyplace in netbsd or any other system
>where this info is available.
>
>Is there some stat interface I'm unaware of, or are the various per-packet
>stats all we have?  Is there any interest in seeing byte counts kept?

Actually, this is kept track of in the kernel in the ifnet structures,
you just need a kernel-grovelling app to drag the data out.
As a quick test, I changed the references to "ipackets" and "opackets"
in netstat/if.c to "ibytes" and "obytes" and got interesting
values.

>My interest is in seeing the ultimate figure of merit: bytes-transferred-
>per-second.  Of course, I'm mainly interested in this as a percentage of
>wire speed.

If you are interested in performance benchmarking, I've found ttcp
to be useful for this, and I think lots of folks like Rick Jones'
netperf utility.  YMMV.

Kevin