[rrd-users] Re: repeating the last value seen

Serge Maandag serge.maandag at staff.zeelandnet.nl
Wed Apr 16 22:44:33 MEST 2003


Or upgrade your rrdtool and do:

DEF:unkasunk=/path/to/rrd
CDEF:unkasprev=unkasunk,UN,PREV,unkasunk,IF

which translates to:

if (unkasunk = unknown)
	use previous value
else
	use value
end if

I don't use it, but i think it should work.

Serge.

-----Original Message-----
From: Warnes, Jason SktnHR
[mailto:jason.warnes at saskatoonhealthregion.ca]
Sent: Wednesday, April 16, 2003 7:23 PM
To: 'Henrique Pantarotto'; rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Re: repeating the last value seen


I haven't tried this yet, but I think I might have a way.  My solution will
have to be a bit generalized because I'm not sure what environment you're
working with RRDTool in (ie: Perl, shell script, batch files, etc...):
1.  Read with the last update of the RRD occurred with the LAST command.
2.  Using the date which was read in step 1, read the last with the FETCH
command (I think you can use the same start and end time).  Store this value
in a temporary variable.
3.  If you don't have any current data to store in your RRA, store the
temporary variable.

OR - a less sophisticated way if unknown values are zero:
1.  If you don't have any current data to store in your RRA, store 0 (zero).
This is what I do for my Terminal Server usage graphs.

Hope this helps.

Jason...

-----Original Message-----
From: Henrique Pantarotto [mailto:henpate at terra.com.br] 
Sent: Wednesday, April 16, 2003 5:00 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] repeating the last value seen


Hello!

How can I simulate MRTG´s behavior of repeating the last value seen, so the
graphics generated by RRDTOOL won´t have those UNKWN gaps (for missing
data)?  I am really looking for a "nounknaszero" option, or some kind of
fancy CDEF rule to do this.  ;-)

Is this possible?

I´ve tried searching the maillist for this, but I have not suceeded finding
threads regarding this matter.


Thanks, Henrique.

--
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

--
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