[mrtg] problems using snmpget...

José Maria Costa Pereira ze.maria at telecelvodafone.pt
Wed Jun 20 16:04:03 MEST 2001


Hi!

I was wondering if anyone can tell me why do I get the value 1 when I use it
on a script with mrtg. 

For example:

#!/usr/bin/perl -w
use lib "c:\\mrtg-2.9.10\\lib\\mrtg2";
use SNMP_util;
use BER;
$BER::pretty_print_timeticks=0;

sub DoMain {
		my $host = shift;
		my $community = shift;
		my $composite = $community.'@'.$host.':::::2';
		my $uptime = &snmpget($composite,'1.3.6.1.2.1.1.3.0');

		print "$uptime\n0\n0\n0\n";
}
DoMain(@ARGV);
exit;


Thanks.

Jose Maria.

---------- 
This message may contain confidential information or privileged material,
and is intended only for the individual(s) named. If you are not in the
named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses.  The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission. If verification is required please
request a hard-copy version. 

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list