[rrd-users] script from rrdtutorial

Jean-Michel Kelbert jean-michel at kelbert.com
Mon Jul 30 11:25:44 MEST 2001


Could you tell me where I can find the script :

while not the end of the universe
      get result of
         snmpget router community
      into variable $in
      get result of
         snmpget router community
      into variable $out

      rrdtool update myrouter.rrd N:$in:$out

      wait for 5 minutes

in perl ! I am an beginner in perl so I tried to do something but it
doesn't work :

#! /usr/bin/perl
use strict;
use vars qw($session $error $response_in $response_out);
use Net::SNMP;
($session, $error) = Net::SNMP->session(
   -hostname  => shift || 'intel',
   -community => shift || 'public'
if (!defined($session)) {
   printf("ERROR: %s.\n", $error);
   exit 1;
my $in = '';
#my $out = '';
if (!defined($response_in = $session->get_request($in))) {
   printf("ERROR: %s.\n", $session->error());
   exit 1;
#if (!defined($response_out = $session->get_request($out))) {
#   printf("ERROR: %s.\n", $session->error());
#   $session->close();
#   exit 1;
#system("rrdtool update intel.rrd
exit 0;

I ve got this error :

ERROR: Received SNMP noSuchName(2) error-status at error-index 1.  

Jean-Michel Kelbert

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