[rrd-users] Error - ERROR: expected 2 data source readings (got 1) from a:a:...

learnrrd tool learnrrd at gmail.com
Tue Jul 12 20:39:48 MEST 2005


Hi,

I have written a very simple C program which will feed random data to
the RRD tool for graphing. But, I am getting the error

ERROR: expected 2 data source readings (got 1) from a:a:...


My Create command is :

    system("rrdtool create test_data.rrd --step 3 DS:a:GAUGE:600:0:U
DS:b:GAUGE:600:0:U RRA:AVERAGE:0.
5:1:200");


In update, I would like to update the values of a and b with values 1
and 2. Is this the right update command?

    system("rrdtool update test_data.rrd a:1 b:2 N");

If so, why am I getting an error?

Also, what if I want to update a and b with not constants like 1, 2
but with some value returned by a function say fn1() and fn2(). Is
this how I write the update command?

    ret1 = fn1();
    ret2 = fn2();

   system("rrdtool update test_data.rrd a:ret1 b:ret2 N");

Is this ok? Please correct me.

Thanks!

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list