[mrtg] Re: Plot computers online/each computers traffic

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Sep 18 10:59:21 MEST 1999

> I want to use mrtg on my network to plot the number of computers that are
> using the network at the moment.

First you would have to define "at the moment".
You'll find that this is not as easy as it may look.
The most easy case is on shared ethernet (coax), the number is
zero or one. This is not what you want to know, you want to know
the talkers in a previously defined interval (say 5 minutes).

> I also would like to be able to see how much traffic each computer on the
> network is using.
> I know this can be done by installing snmp on each computer, but since most
> ppl are using win95/98 I would rather just use the router (a linux router)
> to get this traffic information. I am pretty new to MRTG and would

Do you understand that a router may not be the place to monitor this ?
If two computers are on the same LAN, the traffic does not enter the
router at all!
Or do you perhaps mean that you would like to know how much each computer
is consuming on your WAN/internet link(s) ?

> appreciate some help to accomplish these two things.
> Maybe someone knows of someone that have done this before? For now I have
> just MRTG to monitor the total traffic use for the whole network.
> Doesn't that snmp information also contain traffic data about each
> ip-number?
AFAIK there is no such part in the (standard) MIB.
You could build something using tcpdump (or perhaps by other means),
feeding source, destination and size into a program that you have to
write. This program then needs to maintain a list with information
and keep track of the different talkers in the interval (a roling list).
Create a table in the program that keeps a timestamp and src/dst pair,
and when you remove old data each time (old: timestamp older than 5 mins)
you can just retrieve the list, removing duplicate entries.

No solution from me I'm afraid.
I know of commercially available stuff (packetshaper) but I'm afraid
this is out of budget (considering that you use a linux router).


* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

More information about the mrtg mailing list