[mrtg-developers] Need Help - Re: [mrtg] Re: Spikes in MRTG graphs and logs... FOUN D the PROBLEM
Schuyler Bishop
SBishop at e-xpedient.com
Mon Jul 2 17:00:29 MEST 2001
Ok - I added more code to my MRTG to try to figure out what was going on,
and found that the -1 is actually coming directly from the "getcurrent"
routine:
Blah Blah... $inlast $outlast
---------------------------------------------------------------------------
from getcurrent: 2984527670 1443454622
just polled: 2984527670 1443454622
Mon Jul 2 00:00:05 2001 994046405 2984527670 1443454622
from getcurrent: -1 -1
just polled: -1 -1
Mon Jul 2 00:05:16 2001 994046716 -1 -1
from getcurrent: 2987448667 1452871926
just polled: 2987448667 1452871926
Mon Jul 2 00:10:05 2001 994047005 2987448667 1452871926
Note that this is in execution order within MRTG - the "getcurrent" is from
the getcurrent{} sub, and "just polled" is from within the main{} sub.
Finally, the date line with the timestamp is from writegraphics{}.
Since the getcurrent{} polls of -1 are coming directly from snmpget(), it
seems to me that I need to trap for it right after it gets those values.
However, how do I tell MRTG to put the previous poll's value for the current
value so that there's just a flat line at the previous rate? It seems to me
that the logic for that would have to already BE in MRTG so that it can deal
with a counter wrap.
Thanks again.
Schuyler
-----Original Message-----
From: Schuyler Bishop [mailto:SBishop at e-xpedient.com]
Sent: Friday, June 29, 2001 10:19 AM
To: 'Alex van den Bogaerdt'
Cc: mrtg at list.ee.ethz.ch; 'mrtg-developers at list.ee.ethz.ch'
Subject: [mrtg-developers] Re: [mrtg] Re: Spikes in MRTG graphs and
logs... FOUND the PROBLE M
It seem to me that a change such as that wouldn't have any affect on the
problem. I assume that when the current value is less than the previous
value, MRTG assumes a roll and subtracts the previous value from the
physical max (2^32), and then adds the current value. If that is the case,
then the -1 will never be seen by RRDTool.
In my case, the previous poll was pretty low for both counters:
Thu Jun 28 17:20:02 2001 993763202 1790956512 706949457
Thu Jun 28 17:26:31 2001 993763591 -1 -1
So it reported a spike of 63.6 Mb/s in and 73.3 Mb/s out, since both
counters were pretty well below 2^32.
It seems to me that all that is needed is a check to see if the current poll
is less than zero, and if so, just report the previous value again (the same
behavior that is supposed to happen when it can't reach the host).
Something else that just struck me was the time of the second poll. Look at
the longer list:
Thu Jun 28 16:50:02 2001 993761402 1706480626 694622514
Thu Jun 28 16:55:02 2001 993761702 1722315931 696090649
Thu Jun 28 17:00:02 2001 993762002 1738930880 697502371
Thu Jun 28 17:05:03 2001 993762303 1749758509 699396681
Thu Jun 28 17:10:02 2001 993762602 1767351428 702135803
Thu Jun 28 17:15:02 2001 993762902 1780673908 705778708
Thu Jun 28 17:20:02 2001 993763202 1790956512 706949457
Thu Jun 28 17:26:31 2001 993763591 -1 -1
Thu Jun 28 17:30:02 2001 993763802 1817929920 709769652
Thu Jun 28 17:35:02 2001 993764102 1831857443 712946868
Thu Jun 28 17:40:02 2001 993764402 1839530927 718236504
Thu Jun 28 17:45:02 2001 993764702 1856599412 721383317
Thu Jun 28 17:50:03 2001 993765003 1875336296 722845887
Thu Jun 28 17:55:03 2001 993765303 1885908745 724238206
Thu Jun 28 18:00:03 2001 993765603 1900195206 725823316
Thu Jun 28 18:05:03 2001 993765903 1906107396 727254246
Every other poll happens almost exactly at the same time except that one,
which is a full 90 seconds later!
What's the timeout for SNMP queries?
Schuyler
-----Original Message-----
From: Alex van den Bogaerdt [mailto:alex at slot.hollandcasino.nl]
Sent: Friday, June 29, 2001 4:42 AM
To: SBishop at e-xpedient.com
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] Re: Spikes in MRTG graphs and logs... FOUND the
PROBLE
Schuyler Bishop wrote:
> (I'm using RRD...)
> So, why the heck is it reporting a negative number??? I would think that
if
> the poll is unsuccessful (for whatever reason - timeout?) then it would
> report a zero for the absolute value!
This I don't know. However, if you're using RRDtool just use the
"rrdtool tune" command and set the minimum allowed value to 0.
If a negative number is reported, it will be discarded by RRDtool.
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-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers
--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers
More information about the mrtg-developers
mailing list