[rrd-users] expected 2 data source got <8>

Smita Dutta smita20001 at yahoo.com
Tue Apr 27 05:25:32 MEST 2004


I am trying to create and update an RRD.I have taken the example from 
RRD site.But I am getting the following error.
ERROR while updating mydemo.rrd:expected 2 data source got <8> from 
N:IF.....

This is the one I created:

rrdtool create myrouter.rrd         \
            DS:input:COUNTER:600:U:U   \
            DS:output:COUNTER:600:U:U  \
            RRA:AVERAGE:0.5:1:600      \
            RRA:AVERAGE:0.5:6:700      \
            RRA:AVERAGE:0.5:24:775     \
            RRA:AVERAGE:0.5:288:797    \
            RRA:MAX:0.5:1:600          \
            RRA:MAX:0.5:6:700          \
            RRA:MAX:0.5:24:775         \
            RRA:MAX:0.5:288:797


This is my perl script:

use lib qw( "C:/mrtg-2.10.13/bin/mrtg1);
$local_dir="C:/mrtg-2.10.13/bin/mrtg1";
$a=0;
use RRDs;
use Net::SNMP;
while($a==0)
{
$in1=`snmpwalk -v 1 -c public addr 1.3.6.1.2.1.2.2.1.10.1`;
$out1=`snmpwalk -v 1 -c public addr 1.3.6.1.2.1.2.2.1.16.1`;
print $in1;
print $out1;
RRDs::update("$local_dir/myrouter.rrd","N:$in1:$out1");
my $ERR=RRDs::error;
die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR;
sleep(300 );
}

I want this to run every 5 min.
I want to store the no of InOctets and OutOctets in 2 data sources.The result I get when I try SNMPGET from the command prompt and that when I run this perl script is entirely different.May be the syntax is incorrect.
Please help.




		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

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