Hi, Stuart.

On Sat, 14 Feb 2004 10:41:33 +1100, "Stuart Clark" wrote 
in <[EMAIL PROTECTED]>:
>
> Is there a way to invoke snmp_util.pm from the shell?

I wrote a simple wrapper for that purpose, just for my interest :)
-----------------------------------------------------------------
#!/usr/bin/perl -w -I/usr/local/mrtg/lib/mrtg2

use SNMP_util;
use strict;

# load MIB file
snmpQueue_MIB_File('/usr/local/squid/etc/mib.txt');

my @vals = snmpget(shift, @ARGV);
# my @vals = snmpwalk(shift, @ARGV);
print join("\n", @vals), "\n";

# EOF
-----------------------------------------------------------------

You can invoke it like this:
./MRTGget.pl [EMAIL PROTECTED]:port cacheSysVMsize


Hope that helps,
Takumi Yamane <[EMAIL PROTECTED]>

--
Unsubscribe mailto:[EMAIL PROTECTED]
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

Reply via email to