Help counting # of bytes in/out of interfaces

Ricardo Meleschi meleschi at
Tue Apr 20 12:35:46 EDT 2004


This is my 1st post to this list, so please let me know if I'm doing
anything incorrectly:

The OS we're working on is Solaris 8, with a sprinkling of 7 and 9.  The
versions of 8 vary from 10/01 onwards.

The computers vary across the board from Netra T1's to 880R's (and
almost everything in between!)

What I am attempting to do is use Big Brother and LARRD to graph the
bytes in  and out of each interface on the box.  Previously, we used
Net-SNMP and MRTG to graph this data, however NET-SNMP is no longer an
option unfortunately, so I am attempting to gather this data with a
custom BigBrother client script.

All that being said, this is where I've gotten with this problem:

Originally, I wanted to use netstat -i however, this lists the # of
packets that have passed through the interface.  Is there any (easy) way
to accurately count the number of bytes that went through an interface
simply by knowing the packet count?  My gut feeling is no, as the size
of packets can vary immensely up to the interface's MTU.

Now I'm attempting to use netstat -s (I've tried netstat -sa, and
netstat -sI <interface>) however I cannot get the TCP header to be
broken up into a per interface statistic.

The reason we want to graph bytes in/out is to see when we're hitting
the throughput limits of our interfaces, and to also graph errors in and
out.  It's handy to know this information on the fly, and see it
historically graphed for trending purposes.

Thanks for any help,
Ricardo Meleschi

More information about the sunmanagers mailing list