[mrtg] Re: MRTG not saving history of plot in .log files

diget+mrtg at unix.cc.wmich.edu diget+mrtg at unix.cc.wmich.edu
Sat Oct 6 17:20:41 MEST 2001

What we do is the following:

>From our global-mailstat-messsages.cfg:
Options[_]: growright, noinfo, nopercent, transparent, absolute
YLegend[_]: messages/minute
ShortLegend[_]: msgs/min

LegendI[_]:  Incoming:
LegendO[_]:  Outgoing:
Legend1[_]: Incoming mail messages per minute
Legend2[_]: Outgoing mail messages per minute
Legend3[_]: Maximal 5 minute Incoming messages
Legend4[_]: Maximal 5 minute Outgoing messages

Title[$]:  sendmail statistics - message count
PageTop[$]:  sendmail statistics - message count</H1>

And then the target is:
Target[messages-3]: mailstats * 60

This gives us the number of messages per minute.  What we found is
that you can NOT use the gauge and perminute option as they are
exculsive.  Same applies for the guage and perhour option.  (I posted
to this effect back in June and suggested that this be noted in the
documentation.)  As is noted below, MRTG will divide the data sample
by the time measurement delta.  I have found that the math on the
target line is handled before the time delta division is done,
therefore, you can multiply by 60 to get a per minute (assuming a 5
minute sample), by 300 to get a per 5 minute values.

One thing to possibly note, is that we are not using the
contrib/mailstat program.  We took it and modified it so that the
client side is a Bourne shell script and returns to the perl program
on the MRTG machine a guage value of sendmail's mailstat output for
the values we are lookging for.  See
http://unix.cc.wmich.edu/mrtg/systems/gw1/mail.html for some sample

Derek Diget
Western Michigan University - Kalamazoo Michigan USA - www.wmich.edu/
Office of Information Technology - UNIX support - www.wmich.edu/unix/

On Oct 6, 2001 at 14:03 +0200, Alex van den Bogaerdt wrote:
=>Oliver Schulze L. wrote:
=>> I get some 200 emails per day, so I think that I don't get more than 0
=>> emails per seconds.
=>> Should I use a perminute option for this setup?
=>That's probably not good enough.  Unless you receive your mail
=>by five at a time, you still end up with numbers below 1 (assuming
=>the default sample period of 300 seconds).
=>  sample at time "T" shows there are 10 emails received
=>  sleep 300
=>  sample at time "T+300" shows there are 11 emails received
=>Delta_emails is 1, delta_time is 5 (minutes, we're using per minute)
=>Calculation of "rate":  delta_email / delta_time == 0.2
=>MRTG works with integers so this 0.2 is truncated to 0.
=>If you'd try and sample only once per day:
=>at time "T" the number is 0
=>at time "T+86400" the number is 200
=>Difference is 200 and 86400, rate is:
=>normal:    200/86400  == 0.0023148148  --> 0
=>perminute: 200/1440   == 0.1388888888  --> 0
=>perhour:   200/24     == 8.3333333333  --> 8
=>If you calculate the number of emails from the rate:
=>0*86400 = 0 emails
=>0*1440 = 0 emails
=>8*24 = 192 emails (and not the 200 you've really transfered)
=>As you can see MRTG is not very good in these low numbers.  You could
=>have a peek at RRDtool and see if that works for you.  However, you
=>will get results like "2.3148148 milimail per second" which is a proper
=>presentatin however some people think it is not done to talk about

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