[rrd-users] PRINT question

A Darren Dunham ddunham at taos.com
Thu Apr 23 08:20:54 CEST 2009


On Wed, Apr 22, 2009 at 04:42:25PM -0700, Robert Hagens wrote:
> I am new to RRD, but have spent about 12 hours struggling with this, so
> I hope someone can help. 
> 
> I am creating an rrd
> 
> /usr/bin/rrdtool create /tmp/ea.rrd --start 1240207200 --step 7200
> DS:ds:GAUGE:43200:0:100 RRA:LAST:0.5:1:100
> 
> And loading some data into it (I realize the values are all one)
> 
> /usr/bin/rrdtool update /tmp/ea.rrd 1240246749:1 1240252503:1
> 1240259704:1 1240266904:1 1240274104:1 1240281305:1 1240288503:1
> 1240295704:1 1240302903:1 1240310104:1 1240317304:1 1240324504:1
> 1240331703:1 1240338903:1 1240346103:1 1240353304:1 1240360503:1
> 1240367704:1 1240374903:1 1240382104:1 1240389304:1 1240396503:1
> 1240403704:1 1240410904:1 
> 
> Now, I just want to print the data out. I try
> 
> /usr/bin/rrdtool graph /tmp/ea.rrd --start 20090420
> 'DEF:ds0=/tmp/ea.rrd:ds:LAST' 'PRINT:ds0:LAST:%2.2lf'

I'm not sure what you intend with that PRINT statement.  I'm also not
sure what it's doing.

> And get
> 
> 0x0
> 100.00

I can't reproduce that.  I'm using 1.2.27 and it chokes on a start time
that looks like a date.  When I give it a start time from one of your
updates, I see a single value of 1.0 (which seems reasonable).

> I was expecting to get a list of values?

If you want a list of values, use 'rrdfetch' instead.

rrdtool fetch /tmp/ea.rrd LAST --start <start> --end <end>

-- 
Darren



More information about the rrd-users mailing list