From ae4ad57d12cda350022aff26380d40f6d1779b87 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Thu, 17 Mar 2016 01:22:01 +0000 Subject: SNMPfetch: Try random things to nail down deadlock It's not a big deal, but it's ugly. :wq asf --- clients/snmpfetchng.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clients') 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); } -- cgit v1.2.3