Re: ipac/iptables + mrtg accounting

Linux Advanced Routing and Traffic Control

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

 



On Sunday 03 November 2002 15:05, Pedro Larroy wrote:
> On Fri, Nov 01, 2002 at 09:56:36AM +0100, Stef Coene wrote:
> > On Friday 01 November 2002 03:06, Kenneth Porter wrote:
> > > --On Thursday, October 31, 2002 9:13 PM +0000 lartc@cnicules.4email.net
> > >
> > > wrote:
> > > > i've installed mrtg to make graphics of the trafic from the interfece
> > > > throw the snmpd, and the same with ipac witch put iptables accounting
> > > > rules colect them and store, and gets the output,
> > >
> > > Do you have a pointer to where to set up MRTG to do this? I couldn't
> > > find anything in the LARTC document about "measuring" or "snmp".
> >
> > Mrtg monitors only incoming and outgoing packets/bytes of a network
> > interface. I created my own script that uses the tc counter to create
> > some graphs.  It look ugly, but I'm working on it.  You can find it on
> > www.docum.org under GUI.
>
> I have some perl scripts for measuring with rrdtool.
>
> > I'm also trying to write a perl script that can extend the snmpd daemon
> > so you can also querying tc counters with snmp.  But that script is not
> > working.
>
> How are you planning to integrate snmp with tc? Maybe we could gather
> the data at a lower layer rather than the output of tc.
I have a script that you can put in the snmd.conf.  It gives all counters on 1 
line.  It works, but there is a limit on how much data you can send if you 
use snmp.

I created a second script so you can do this :

snmpwalk server  public .1.3.6.1.4.1.2021.257
enterprises.ucdavis.257.0.0 = "Network interface names"
enterprises.ucdavis.257.0.1 = "lo"
enterprises.ucdavis.257.0.2 = "eth0"
enterprises.ucdavis.257.1.0 = "Root classes"
enterprises.ucdavis.257.1.1 = ""
enterprises.ucdavis.257.1.2 = " 1:1 "
enterprises.ucdavis.257.2.2.1 = "Child information"
enterprises.ucdavis.257.3 = "CHILDS info of 1:"

Let's I want to know the child classes of 1:1 
snmpwalk server public .1.3.6.1.4.1.2021.257.2.2.1.1
enterprises.ucdavis.257.2.2.1.2 = " 1:10  1:20  1:30 "

2.2.1.1 at the end means :
2 : device 2 = eth0
2 : give me the child onfi
1.1 : class 1:1

And so on.  Each time you asks for something, a perl script is lanched, it 
reads a config file so it knows the tc classes and childs.  This config file 
must exists and updated manually.  It's ugly, but it works.

I have to find some info about snmp and even don't know if this script is 
usefull.  But you can have it if you want.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux