c has asked for the wisdom of the Perl Monks concerning the following question:

I am using net::snmp to make a cisco router write its running-configuration to its startup-configuration. my oid value seems to be correct, and my net::snmp syntax also seems to be correct. however, my $s->error; call continues to get a value.
I receive No response from agent on remote host 'router' when i run the code against the router. The odd part, is that it works! The config actually gets committed to the router's startup memory, however it almost seems as though the process is taking long enough that net::snmp is thinking that the connection has timed out or that the router is not responding to the snmpset.

my code is as follows:

my $mib = "$wrmem"; for my $host(@routers) { my $s = Net::SNMP->session( -hostname => $host, -community => $community ); $s->set_request($mib, INTEGER, "1"); my $error = $s->error; $s->close; if ($error) { print "\n$error\n\n"; } else { print "\nSuccessfully wrote config to memory on $host.\n\n"

So, although not directly a perl question, does anyone have input on how i could get around this issue but still keep error checking in the mix?

humbly -c