[rrd-users] Re: Counter reset to zero question

Todd Caine tcaine at eli.net
Fri Jul 2 00:23:42 MEST 2004


The interfaces MIB has an example of one way the problem can be dealt with.  It stores the value of sysUptime for each interface upon interface counter resets.  You know you have a counter reset when one of the discontinuity times change.

  Directory: /mgmt/mib-2/ifMIB/ifMIBObjects/ifXTable/ifXEntry/ifCounterDiscontinuityTime
  OID: 1.3.6.1.2.1.31.1.1.1.19
  -------------------------------------------------------------------------------------------------------------------------------------------
  ifCounterDiscontinuityTime OBJECT-TYPE   |  -R- Time    
  -------------------------------------------------------------------------------------------------------------------------------------------
  "The value of sysUpTime on the most recent occasion at which any one or more of this interface's counters suffered a discontinuity. The 
  relevant counters are the specific instances associated with this interface of any Counter32 or Counter64 object contained in the ifTable 
  or ifXTable. If no such discontinuities have occurred since the last re-initialization of the local management subsystem, then this object 
  contains a zero value." 

  SNMX-5.1> whatis 19

  ifCounterDiscontinuityTime OBJECT-TYPE
     SYNTAX      TimeTicks
     ACCESS      read-only
     STATUS      mandatory
     DESCRIPTION " "
     ::=    { ifXEntry 19 }

If you aren't monitoring interface octet counters it may still be possible to modify the program in question to store a timestamp for each counter and then have it update the timestamp for any counter who's value has been manually reset.

Just a thought.

On (Thu, Jul 01 14:27), Jack Tavares wrote:
>  
> > > I can set a MAX value when computing the CDEF, but 
> > > I was wondering if there was a better way to do this?
> > 
> > Yes.  First of all, rates above the maximum will never make
> > it into the RRAs.  Use that to your advantage and do set
> > a maximum.
> > 
> Thank you
> 
> > Secondly:  make sure RRDtool gets valid input.  When you give
> > a counter value to RRDtool, you are saying: "This is the new
> > value.  Use it together with the previous one to compute a
> > rate".
> > 
> > When a reset occurs, the previous value is zero, and its
> > timestamp is the time at which the boot occured.  Make sure
> > RRDtool knows this.  To do so, you have to insert the value 0
> > with an appropriate timestamp.
> > 
> > When you do this, you have the same problem: The previous
> > value (before zero) isn't correct.  Most likely you don't
> > know what it was:  The value at (boottime-1) is "U" (unknown).
> > Insert that as well.
> > 
> > You will miss one interval: The one between the last known
> > poll before boot and boot itself.
> > 
> > Alternatively, you can just enter "U" one second before the
> > first update after boot.  Doing so will mean you miss two
> > additional intervals.
> > 
> Hmm. The problem with this is:
> 
> ProgramA keeps a counter.
> ProgramB queries ProgramA every N seconds to get the value of the
> counter
> 	and then stuffs them into an RRD
> 
> At anytime, ProgramA can get it's stats reset
> (user actuated)
> 
> ProgramB has no way to know that ProgramA's stats have been reset
> (other than having ProgramB remember the last value, and if the new
> value is less than that, insert an "U" into the RRD)
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list