[mrtg] Re: generating max spikes in an MRTG chart?

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Fri Jan 19 20:28:05 MET 2001


fmook at bettendorf.lib.ia.us wrote:

> I'm fairly new to working with MRTG and RRDtool and I'm wondering if there's
> a good way to show extreme usage.  For instance, I've got a 56k line that
> periodically might spike up to 100% usage for 15 seconds, and then be at 5%
> usage the rest of the time, which gets displayed on the graph as very low
> usage on average.  Is there a way to display the 100% spike on the chart?
> Currently I'm running a crond job to run MRTG/RRDtool every minute, with
> "Interval: 1" in the config files, and using routers.cgi to generate the
> charts.  Thanks for any suggestions.

There is no reason why RRDtool can't handle this.  I wouldn't use
MRTG to get the data.

There are a few problems, here's a selection:
- When will you stop lowering the sampling period?  Suppose you make it
  really small, you get down to the bit level and you either are or are
  not sending data.  This is not useful information
- How accurate is your sampling?  Do you know *exactly* how many seconds
  apart the data was sampled?  For 5-minute intervals it doesn't matter
  much if you're one second off.  It does matter on 15-second intervals
- Can both the hardware and the software handle the amount of data?  It
  is not too hard to do but be aware that updates *do* take cpu cycles

Some recommendations:

Use RRDtool, without using MRTG, to store the samples.

Use a clock that can be read from the device in the same read operation
where you query the counters.  This way there are no problems with
network latency and jitter.

Don't use cron.  Create a process that doesn't stop, using sleep calls.

pseudo code:
   while end-flag-not-set
   do
      var (a,b,c) = snmpget device passwd inOctets.1 outOctets.1 timestamp
      rrdtool update t:a:b
      sleep 14
   done

I think you can use 14all.cgi to produce the graphs.

cheers,
-- 
   __________________________________________________________________
 / 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