[rrd-users] Using PREV to calcuate a total

skantner at dsscorp.com skantner at dsscorp.com
Thu Sep 25 04:16:09 MEST 2003


I am using an RRD to store outage information on an hourly basis.   Each 
row represents a number of minutes the monitored system was down during 
the hour
step 3600
DS:missed:GAUGE:7200:0:60 
RRA:MAX:0.5:1:8760 

I would like to create a CDEF to calculate the total number of missed 
minutes over the time period of my graph.   I haved tried the following, 
but get  -1.
Based on the data I have loaded (and verified to be) in the RRD, the 
actual value I get should be 91.    There are a number of rows that have 
unknown values, as the monitoring system itself was down at various times 
during the time period being graphed.

Here is my attempt:

DEF:missedmins=$rrdfile:missed:MAX
CDEF:totmissed=missedmins,UN,0,missedmins,IF,PREV,+
GPRINT:totmissed:MAX:"totmissed %3.0lf"

I've never used PREV before, so I suspect I may not be using it correctly? 
 

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