[rrd-users] Re: Another can fetch but not graph

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Dec 18 13:45:14 MET 1999


ghong at roadrunner.aunet.net wrote:
> 
> 
> But we I tried to graph, I got:
> [cricket at test-pos1 ~/cricket]$ /usr/local/rrdtool/bin/rrdtool graph
> /dev/null
> DEF:ds0=/home/cricket/cricket-config/../cricket-data//routers/rrd.iasiaworks.com.rrd:ds0:AVERAGE
> DEF:ds1=/home/cricket/cricket-config/../cricket-data//routers/rrd.iasiaworks.com.rrd:ds0:MAX
> CDEF:sds0=ds0,1,* CDEF:sds1=ds1,1,* PRINT:sds0:AVERAGE:%f PRINT:sds1:MAX:%f
> /usr/local/rrdtool/bin/rrdtool: No match.
> 
First of all, don't make it so @%*^ easy to make mistakes.

Try this from a batch file, -not- from the command prompt:

    #!/bin/bash
    cd /home/cricket/cricket-data/routers/
    /usr/local/rrdtool/bin/rrdtool graph /tmp/blah \
       DEF:ds0=rrd.iasiaworks.com.rrd:ds0:AVERAGE \
       PRINT:ds0:AVERAGE:\%lf

Only when this works, make it more complex.  It is much more easy to
debug it this way...

Some general tips:

In /usr/local/bin, create a soft link named rrdtool, pointing to
/usr/local/rrdtool/bin/rrdtool.  Make sure /usr/local/bin is in your
path and now you can call rrdtool without typing the full path.

Use %lf, not %f.

Make sure to quote the percent in %lf as this is for rrdtool, not for
your shell. The same applies to other special characters.  When in doubt,
quote.  It usually doesn't hurt to quote normal characters, it does hurt
when you don't quote special characters.

Always start with the basics, only when these work out, you can extend
your scripts or else you won't know where it fails.

regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

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



More information about the rrd-users mailing list