Total Network Usage

Bill Nash plug-discuss@lists.plug.phoenix.az.us
Wed, 10 Apr 2002 23:31:57 +0700 (GMT-7)


On Wed, 10 Apr 2002, der.hans wrote:
> $ ifconfig eth0
> eth0      Link encap:Ethernet  HWaddr 00:60:97:D1:69:B1
>           inet addr:10.1.1.102  Bcast:10.1.1.255  Mask:255.255.255.0
>           inet6 addr: fe80::260:97ff:fed1:69b1/10 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:9363754 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:8015373 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           RX bytes:1525349627 (1454.6 Mb)  TX bytes:1507412321 (1437.5 Mb)
>           Interrupt:10 Base address:0xd400
>
> Those are 'packet' numbers, so I'm not sure they correspond to bytes or
> anything.

	I believe those are octet counters. ($value / 8) = $total_bits;

> > I am running RedHat 7.2 and already use MRTG to get some information.
>
> mrtg should be able to map stuff for you, but it only takes snapshots of
> current bandwidth use rather than total number of bytes moved.
>

	Depends on the counters you're using. Most SNMP traffic counters
are incremental from zero to 2^32 (for 32 bit counters), and reflect a
rolling total. When it reaches the limit for the counter, it rolls over to
0 and starts over. Some router and switch vendors do provide rate
counters, though. MRTG normal presentation of packets or bits/bytes per
second is a time derived value using the different between samples,
usually five minutes apart.

- billn