[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Traffic Monitoring

Here is an english translation of your post from babel.altavista.com. Its not good, but we might be able to help if we can understand what you're asking.

On Tuesday, September 10, 2002, at 09:12 PM, Kauffmann, Andreas wrote:

Hello dear list;)

I have a problem would like I 3(!) Computers from different nets supervise. That is, I would like to measure the totally caused data communication volume (the Traffic) of the computers. At the Montsende expression of the program should look in such a way: PC01 made 60GB Traffic PC02 made 34,3245GB Traffic Etc.... Understands its which I mean;)

I need evenly a program for it... best for Linux, but would also go for Windows.

Any Ideas?

Yours sincerely

Andreas Kauffman

Most people do this by grabbing the SNMP traffic statistics from the switch or router that the machines are plugged into, and graphing the numbers, with a product like mrtg.



also might work (and save a lot of your time):

  apt-get install mrtg

MRTG works well for small numbers of hosts, however you might want to look at NRG (http://nrg.hep.wisc.edu/) or Cricket (http://cricket.sourceforge.net/) which both use the RRDTool back-end database and graph generation tools. This is because MRTG generates the graphs every 5 minutes, and RRDTool only generates the graphs the first time they are viewed.

Cricket seems to be available via apt-get/dselect.

If you need empirical numbers that you can then use to bill against, you might want to try writing something simple in perl with the Net::SNMP module to just poll the network devices for their total bytes in and out, and then to store the number in a flat file to produce a report daily or weekly or whatever.

If you do not have SNMP access to the routers the machines are plugged into, then you could write a script that uses the numbers from ifconfig. For example:

kirin:~# ifconfig eth0 | grep bytes
          RX bytes:659408711 (628.8 MiB)  TX bytes:3695073697 (3.4 GiB)

(hmm, maybe I need to get rid of the porn site)

Write a perl (or python, or bash, or whatever your poison is) program to do something intelligent with the numbers, being aware that they get reset to 0 if the machine reboots, etc. You might find they roll over at some particular number, so you might want to find out what that number is. (Probably a 32bit unsigned int).

Maybe someone else knows of a package which would be good to bill customers off (as this seems to be the purpose of your question).

I hope this gives you some ideas.


Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp

"You have just destroyed one model XQJ-37 nuclear powered
pansexual roto-plooker....and you're gonna have to pay for it."
 - Frank Zappa

Reply to: