All pastes #183398 Raw Edit

Something

public text v1 · immutable
#183398 ·published 2006-09-26 21:46 UTC
rendered paste body
use SNMP;
use Data::Dumper;

$ENV{'MIBS'}="ALL";

my $uptime = 'sysUpTime.0';
my $memsize = 'memTotalReal.0';
my $memfree = 'memTotalFree.0';

my $VLIST = new SNMP::VarList( [$auptime],[$memsize],[$memfree] );

# Sets up %hostkeys and creates/connects all the SNMP sessions
&confparse();

my @result = $hostkeys{$host}{session}->get( $VLIST );
print Dumper(@result);