[rrd-users] Re: expected 2 data source got <8>
Smita Dutta
smita20001 at yahoo.com
Fri Apr 30 07:27:57 MEST 2004
Thank you.It works.
Smita
Erik de Mare <erik at oezie.org> wrote:
instead of
snmpwalk -v 1 -c public addr 1.3.6.1.2.1.2.2.1.10.1
use
snmpwalk -O vq -v 1 -c public addr 1.3.6.1.2.1.2.2.1.10.1
look at snmpwalk -h
-O OUTOPTS Toggle various defaults controlling output display:
v: print values only (not OID = value)
q: quick print for easier parsing
>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 );
>}
>
>
--
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
---------------------------------
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