aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-17 01:22:01 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-17 01:22:01 +0000
commitae4ad57d12cda350022aff26380d40f6d1779b87 (patch)
tree3fc826166eb551a9a71c92c4a1f9b08fd2eb23e7
parent3f0cc69990fc73ca711298bf70866416ac757697 (diff)
SNMPfetch: Try random things to nail down deadlock
It's not a big deal, but it's ugly. :wq asf
-rwxr-xr-xclients/snmpfetchng.pl3
-rwxr-xr-xinclude/config.pm.dist3
2 files changed, 3 insertions, 3 deletions
diff --git a/clients/snmpfetchng.pl b/clients/snmpfetchng.pl
index de8f802..dd9862d 100755
--- a/clients/snmpfetchng.pl
+++ b/clients/snmpfetchng.pl
@@ -83,7 +83,6 @@ sub populate_switches
'community' => $ref->{'community'}
};
}
- $dbh->commit;
}
sub inner_loop
@@ -98,7 +97,6 @@ sub inner_loop
$switch{'start'} = time;
$qlock->execute($switch{'id'})
or die "Couldn't lock switch";
- $dbh->commit;
my $s = SNMP::Session->new(DestHost => $switch{'mgtip'},
Community => $switch{'community'},
UseEnums => 1,
@@ -109,6 +107,7 @@ sub inner_loop
$outstanding--;
}
}
+ $dbh->commit;
mylog( "Polling " . @switches . " switches: $poll_todo");
SNMP::MainLoop(5);
}
diff --git a/include/config.pm.dist b/include/config.pm.dist
index 6d9ae94..a1db01a 100755
--- a/include/config.pm.dist
+++ b/include/config.pm.dist
@@ -31,7 +31,8 @@ our @snmp_objects = [
['ifInErrors'],
['ifOutErrors'],
['ifInUnknownProtos'],
-['ifOutQLen']
+['ifOutQLen'],
+['1.3.6.1.4.1.2636.3.1.13.1.7.7.1.0']
];
# Max SNMP polls to fire off at the same time.
our $snmp_max = 20;