[mrtg] Re: graph last value with current?

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Sep 23 09:14:54 MEST 2003

On Mon, Sep 22, 2003 at 05:45:16PM -0500, John wrote:

> > It is probably best to gather the numbers using a separate script,
> > add them to the grand total and feed this grand total to MRTG
> > (using the external program interface).
> > 
> > This being said, I think you really should use another program, such
> > as excel, in stead of creating a workaround using MRTG.

> I'm not down with the excel ;).


> Could i just strip the numbers from the log file?
> awk '{(if $2 ~ [0-9]+) {COUNTER+= $2} END { print bla COUNTER bla}' > total.mrtg?

You want the total in numeric format, not in the graph?

IIRC there's mrtg totalizer.

Something similar to what you wrote, however you do not take care of
three important properties:

1) the first two or three lines are different
2) each remaining line describes "something per second" and should thus
   be multiplied by the number of seconds
3) the log file has 4 parts, each part having a different number of
   seconds per line


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