[vox-tech] Measure network usage?

Samuel Merritt vox-tech@lists.lugod.org
Sat, 28 Jun 2003 01:50:24 -0700 (PDT)


Shawn P. Neugebauer said:
> I have a few Linux boxes that have uptimes of days to months.  I need
> to try to estimate bandwidth usage for a long-ish period of time (e.g.,
> days or weeks) in order to characterize how much bandwidth I use
> (to decide on level-of-service issues for a new ISP---I have to move :(
> ) .   Is there a way to tell the amount (in bytes) of traffic sent and
> received by a running box?  Is there a simple *non-intrusive* tool that
> might "add a little value" to whatever is built-in?  I'm aware of MRTG,
> and Orca, but these are overkill for this type of problem.

Take a look at the output of /sbin/ifconfig. It should have a line like
RX bytes:2328595615 (2.1 GiB)  TX bytes:3104087047 (2.8 GiB)
or so. Have a script dump the byte counts to a text file once an hour, and
then you can do a little simple analysis with a hand-rolled tool.
-- 
No PGP signature because I'm far from home and sending via webmail.