[mrtg] Re: Monitoring virtual domains' bandwidth on a Linux box

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Dec 6 01:41:28 MET 2001


Kerry Cox wrote:

> Okay, here's a bonehead question, so please forgive my ignorance. I am
> currently measuring the amount of traffic being used by several virtual
> domains on a Linux server by capturing the SNMP data from off their port
> on a Cisco 2924 switch into which that Linux machine connects. I know
> that Linux has the ability to do SNMP as well. 

1) A switch doesn't do IP.  It works on ethernet packets.
2) The virtual interfaces on a linux box are, to the best of
   my knowledge, not being monitored by SNMP.
3) Define virtual domain.  Do you just mean HTTP ?  Perhaps your
   webserver can generate the data you're looking for.

However, you may be lucky.  If you are using one unique IP address
per domain you could try to use ipchains to do your logging.  If you
don't specify a jump, the firewall rule doesn't do anything except
incrementing its counters.  Incrementing counters is what MRTG digs.

Without trying it myself (so: YMMV) here's a suggestion:

   ipchains -I input -d 10.1.1.1
   ipchains -I input -d 10.1.1.2
   ipchains -I input -d 10.1.1.3
et cetera
   ipchains -I output -s 10.1.1.1
   ipchains -I output -s 10.1.1.2
   ipchains -I output -s 10.1.1.3
et cetera

Check the packets and bytes using "ipchains -L -v", also see the
manual page and the current topic going on right now on this list.

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list