[rrd-users] Backup data question

Alan Factor afactor at afactor.com
Mon Mar 26 14:47:30 MEST 2001


I'm using rrdtool for the first time and would like to know if I'm using it 
correctly.

A database containing a set of customers (identified by a customer name) 
has data records
consisting of a date, a duration time (in seconds) and a data amount (in 
kilobytes) as follows:

CUSTOMER     DATE             DURATION     AMOUNT
(name)             (yyyymmdd)    (seconds)       (kilobytes)
----------------------------------------------------------------------------------
customer-1       20010301       322                25435600
customer-1       20010302       346                23462600
customer-1       20010312       289                26438600
...
customer-2       20010412       655                45358600
customer-2       20010413       542                45435600
...
customer-3       20010101       404                39935600
customer-3       20010108       407                55435600
customer-3       20010113       428                11222334
...

Each record is actually the sum of each customer's records for a given day
(i.e., the duration and amount fields are summed).

I'd like to make a graph for each customer showing the total duration and 
amount of backups vs. date so here's what I created:

# I create a rrd with a step size of 1 day (86400 sec)
# so the rra should contain the raw data for that day
rrdtool create customer.rrd     \
--start 973065600 --step 86400  \
DS:time:ABSOLUTE:86400:0:U      \
DS:data:ABSOLUTE:86400:0:U      \
RRA:AVERAGE:0.999:1:365

# here I input the data
rrdtool update customer.rrd 973411200:22788:151699776 [...]

# the two graphs below should present the raw data for each day

rrdtool graph customer-time.gif             \
--start -30d --step 86400 -w 800 -h 400 -i  \
-v TIME(sec) -t customer-time.gif           \
DEF:y=customer.rrd:time:AVERAGE             \
CDEF:ry=y LINE2:ry#FF0000 AREA:ry#FF0000

rrdtool graph customer-data.gif             \
--start -30d --step 86400 -w 800 -h 400 -i  \
-v DATA(bytes) -t customer-data.gif         \
DEF:y=customer.rrd:data:AVERAGE             \
CDEF:ry=y LINE2:ry#FF0000 AREA:ry#FF0000


I want to graph both time and amount data for each customer with the line
being the actual data (duration or kilobytes) for that date (ie.., day).

The output seems to be off by a factor of 1000 or more but I can't see why.
Any comments would be appreciated.

Thanks,
Alan

----------
Alan Factor      afactor at afactor.com
888.707.4900     Voice/Fax
888.707.4988     Cell Phone
AFactor LLC     www.afactor.com

----------


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