I have a question about the module Net::SNMP (4.0.3). I'm currently using this module to query a compaq server, to gather temperature metrics from it's various onboard thermoresistors. Below is my current method:
foreach my $probe ( 1 .. $probe_count ) {
my $location = "$thermbase.1.3.0.$probe";
my $temp = "$thermbase.1.4.0.$probe";
my $thresh = "$thermbase.1.5.0.$probe";
my $cond = "$thermbase.1.6.0.$probe";
my $result =
$session->get_request(
-varbindlist => [ $location, $temp, $thresh, $cond ] );
if ( !defined($result) ) {
printf( "ERROR: %s.\n", $session->error );
$session->close;
return;
}
This loops $probe_count times, and pushes the results onto an array later in the script. I'm only grabbing 4 things out of a table that has 8 objects. My question is, Would it be more efficient to do a get_table in one go (and dig around in the returned hash), even though I do not want every piece of data in that table? Essentialy throwing out half the data I collect?
LR
Whip me, Beat me, Make me use Y-ModemG.