diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 3a6fa01..26983cb 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -76,6 +76,8 @@ my $endTime = 0;
 my $reportStats = "";
 my $dataLocation = "/tmp";
 my $startTLSoid = "1.3.6.1.4.1.1466.20037";
+my @statnames=qw(last last_str results srch add mod modrdn moddn cmp del abandon
+                 conns sslconns bind anonbind unbind notesA notesU etime);
 my $s_stats = new_stats_block( );
 my $m_stats = new_stats_block( );
 my $verb = "no";
@@ -95,8 +97,6 @@ my %connList;
 my %bindReport;
 my @vlvconn;
 my @vlvop;
-my @start_time_of_connection;
-my @end_time_of_connection;
 my @fds;
 my $fdds = 0;
 my $reportBinds = "no";
@@ -179,7 +179,7 @@ if ($sizeCount eq "all"){$sizeCount = "100000";}
 
 #######################################
 #                                     #
-# Initialize Arrays and variables     #
+# Initialize Hashes and variables     #
 #                                     #
 #######################################
 
@@ -255,21 +255,17 @@ map {$conn{$_} = $_} @conncodes;
 
 # hash db-backed hashes
 my @hashnames = qw(attr rc src rsrc excount conn_hash ip_hash conncount nentries
-                   filter base ds6xbadpwd saslmech bindlist etime oid);
+                   filter base ds6xbadpwd saslmech bindlist etime oid
+                   start_time_of_connection end_time_of_connection
+                   notesa_conn_op notesu_conn_op etime_conn_op nentries_conn_op
+                   optype_conn_op time_conn_op srch_conn_op del_conn_op mod_conn_op
+                   mdn_conn_op cmp_conn_op bind_conn_op unbind_conn_op ext_conn_op
+                   abandon_conn_op badpwd_conn_op);
 # need per connection code ip address counts - so use a hash table
 # for each connection code - key is ip, val is count
 push @hashnames, @conncodes;
 my $hashes = openHashFiles($dataLocation, @hashnames);
 
-# recno db-backed arrays/lists
-my @arraynames = qw(srchconn srchop delconn delop modconn modop addconn addop modrdnconn modrdnop
-                    cmpconn cmpop targetconn targetop msgid bindconn bindop binddn unbindconn unbindop
-                    extconn extop notesAetime notesAconn notesAop notesAtime notesAnentries
-                    notesUetime notesUconn notesUop notesUtime notesUnentries badpwdconn
-                    badpwdop badpwdip baseval baseconn baseop scopeval scopeconn scopeop
-                    filterval filterconn filterop);
-my $arrays = openArrayFiles($dataLocation, @arraynames);
-
 $needCleanup = 1;
 
 my @err;
@@ -636,6 +632,12 @@ Binds:                        @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 .
 write STDOUT;
 
+# format/write messes up emacs autoformatting - inserting this dummy function
+# fixes that
+sub dummy {
+	my $bar = shift;
+}
+
 print "\n";
 print "Proxied Auth Operations:      $proxiedAuthCount\n";
 print "Persistent Searches:          $persistentSrchCount\n";
@@ -658,115 +660,75 @@ print "Unindexed Components:         $unindexedSrchCountNotesU\n";
 if ($verb eq "yes" || $usage =~ /u/){
 	if ($unindexedSrchCountNotesA > 0){
 		my $conn_hash = $hashes->{conn_hash};
-		my $notesConn = $arrays->{notesAconn};
-		my $notesOp = $arrays->{notesAop};
-		my $notesEtime = $arrays->{notesAetime};
-		my $notesTime = $arrays->{notesAtime};
-		my $notesNentries = $arrays->{notesAnentries};
-		my $base_val = $arrays->{baseval};
-		my $base_conn = $arrays->{baseconn};
-		my $base_op = $arrays->{baseop};
-		my $scope_val = $arrays->{scopeval};
-		my $scope_conn = $arrays->{scopeconn};
-		my $scope_op = $arrays->{scopeop};
-		my $filter_val = $arrays->{filterval};
-		my $filter_conn = $arrays->{filterconn};
-		my $filter_op = $arrays->{filterop};
-		my $notesCount = "1";
+		my $notesa_conn_op = $hashes->{notesa_conn_op};
+		my $time_conn_op = $hashes->{time_conn_op};
+		my $etime_conn_op = $hashes->{etime_conn_op};
+		my $nentries_conn_op = $hashes->{nentries_conn_op};
+		my $base_conn_op = $hashes->{base_conn_op};
+		my $scope_conn_op = $hashes->{scope_conn_op};
+		my $filter_conn_op = $hashes->{filter_conn_op};
+
+		my $notesCount = 1;
 		my $unindexedIp;
-
-		for (my $n = 0; $n < scalar(@{$notesEtime}); $n++){
-			if(!$notesConn->[$n] || $notesConn->[$n] eq "" || 
-			   !$conn_hash->{$notesConn->[$n]} || $conn_hash->{$notesConn->[$n]} eq ""){
-				$unindexedIp = "?";
+		while (my ($conn_op, $count) = each %{$notesa_conn_op}) {
+			my ($conn, $op) = split(",", $conn_op);
+			if (exists($conn_hash->{$conn}) && defined($conn_hash->{$conn})) {
+				$unindexedIp = $conn_hash->{$conn};
 			} else {
-				$unindexedIp = $conn_hash->{$notesConn->[$n]};
-			}
-			print "\n  Unindexed Search #".$notesCount."\n"; $notesCount++;
-			print "  -  Date/Time:             $notesTime->[$n]\n";
-			print "  -  Connection Number:     $notesConn->[$n]\n";
-			print "  -  Operation Number:      $notesOp->[$n]\n";
-			print "  -  Etime:                 $notesEtime->[$n]\n";
-			print "  -  Nentries:              $notesNentries->[$n]\n";
-			print "  -  IP Address:            $unindexedIp\n";
-
-			for (my $nnn = 0; $nnn < $baseCount; $nnn++){
-				if(!$base_conn->[$nnn] || !$base_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $base_conn->[$nnn] && $notesOp->[$n] eq $base_op->[$nnn]){
-					print "  -  Search Base:           $base_val->[$nnn]\n";
-					last;
-				}
-			}
-			for (my $nnn = 0; $nnn < $scopeCount; $nnn++){
-				if(!$scope_conn->[$nnn] || !$scope_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $scope_conn->[$nnn] && $notesOp->[$n] eq $scope_op->[$nnn]){
-					print "  -  Search Scope:          $scope_val->[$nnn]\n";
-					last;
+				$unindexedIp = "?";
 				}
+			print "\n  Unindexed Components #".$notesCount."\n"; $notesCount++;
+			print "  -  Date/Time:             $time_conn_op->{$conn_op}\n";
+			print "  -  Connection Number:     $conn\n";
+			print "  -  Operation Number:      $op\n";
+			print "  -  Etime:                 $etime_conn_op->{$conn_op}\n";
+			print "  -  Nentries:              $nentries_conn_op->{$conn_op}\n";
+			print "  -  IP Address:            $unindexedIp\n";
+			if (exists($base_conn_op->{$conn_op}) && defined($base_conn_op->{$conn_op})) {
+				print "  -  Search Base:           $base_conn_op->{$conn_op}\n";
 			}
-			for (my $nnn = 0; $nnn < $filterCount; $nnn++){	
-				if(!$filter_conn->[$nnn] || !$filter_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $filter_conn->[$nnn] && $notesOp->[$n] eq $filter_op->[$nnn]){
-					print "  -  Search Filter:         $filter_val->[$nnn]\n";
-					last;
+			if (exists($scope_conn_op->{$conn_op}) && defined($scope_conn_op->{$conn_op})) {
+				print "  -  Search Scope:          $scope_conn_op->{$conn_op}\n";
 				}	
+			if (exists($filter_conn_op->{$conn_op}) && defined($filter_conn_op->{$conn_op})) {
+				print "  -  Search Filter:         $filter_conn_op->{$conn_op}\n";
 			}
 		}
 	}
 	if ($unindexedSrchCountNotesU > 0){
 		my $conn_hash = $hashes->{conn_hash};
-		my $notesConn = $arrays->{notesUconn};
-		my $notesOp = $arrays->{notesUop};
-		my $notesEtime = $arrays->{notesUetime};
-		my $notesTime = $arrays->{notesUtime};
-		my $notesNentries = $arrays->{notesUnentries};
-		my $base_val = $arrays->{baseval};
-		my $base_conn = $arrays->{baseconn};
-		my $base_op = $arrays->{baseop};
-		my $scope_val = $arrays->{scopeval};
-		my $scope_conn = $arrays->{scopeconn};
-		my $scope_op = $arrays->{scopeop};
-		my $filter_val = $arrays->{filterval};
-		my $filter_conn = $arrays->{filterconn};
-		my $filter_op = $arrays->{filterop};
-
-		my $notesCount = "1";
+		my $notesu_conn_op = $hashes->{notesu_conn_op};
+		my $time_conn_op = $hashes->{time_conn_op};
+		my $etime_conn_op = $hashes->{etime_conn_op};
+		my $nentries_conn_op = $hashes->{nentries_conn_op};
+		my $base_conn_op = $hashes->{base_conn_op};
+		my $scope_conn_op = $hashes->{scope_conn_op};
+		my $filter_conn_op = $hashes->{filter_conn_op};
+
+		my $notesCount = 1;
 		my $unindexedIp;
-		for (my $n = 0; $n < scalar(@{$notesEtime}); $n++){
-			if(!$notesConn->[$n] || $notesConn->[$n] eq "" || 
-			   !$conn_hash->{$notesConn->[$n]} || $conn_hash->{$notesConn->[$n]} eq ""){
-				$unindexedIp = "?";
+		while (my ($conn_op, $count) = each %{$notesu_conn_op}) {
+			my ($conn, $op) = split(",", $conn_op);
+			if (exists($conn_hash->{$conn}) && defined($conn_hash->{$conn})) {
+				$unindexedIp = $conn_hash->{$conn};
 			} else {
-				$unindexedIp = $conn_hash->{$notesConn->[$n]};
+				$unindexedIp = "?";
 			}
 			print "\n  Unindexed Components #".$notesCount."\n"; $notesCount++;
-			print "  -  Date/Time:             $notesTime->[$n]\n";
-			print "  -  Connection Number:     $notesConn->[$n]\n";
-			print "  -  Operation Number:      $notesOp->[$n]\n";
-			print "  -  Etime:                 $notesEtime->[$n]\n";
-			print "  -  Nentries:              $notesNentries->[$n]\n";
+			print "  -  Date/Time:             $time_conn_op->{$conn_op}\n";
+			print "  -  Connection Number:     $conn\n";
+			print "  -  Operation Number:      $op\n";
+			print "  -  Etime:                 $etime_conn_op->{$conn_op}\n";
+			print "  -  Nentries:              $nentries_conn_op->{$conn_op}\n";
 			print "  -  IP Address:            $unindexedIp\n";
-
-			for (my $nnn = 0; $nnn < $baseCount; $nnn++){
-				if(!$base_conn->[$nnn] || !$base_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $base_conn->[$nnn] && $notesOp->[$n] eq $base_op->[$nnn]){
-					print "  -  Search Base:           $base_val->[$nnn]\n";
-					last;
-				}
-			}
-			for (my $nnn = 0; $nnn < $scopeCount; $nnn++){
-				if(!$scope_conn->[$nnn] || !$scope_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $scope_conn->[$nnn] && $notesOp->[$n] eq $scope_op->[$nnn]){
-					print "  -  Search Scope:          $scope_val->[$nnn]\n";
-					last;
-				}
+			if (exists($base_conn_op->{$conn_op}) && defined($base_conn_op->{$conn_op})) {
+				print "  -  Search Base:           $base_conn_op->{$conn_op}\n";
 			}
-			for (my $nnn = 0; $nnn < $filterCount; $nnn++){	
-				if(!$filter_conn->[$nnn] || !$filter_op->[$nnn]){ next; }
-				if ($notesConn->[$n] eq $filter_conn->[$nnn] && $notesOp->[$n] eq $filter_op->[$nnn]){
-					print "  -  Search Filter:         $filter_val->[$nnn]\n";
-					last;
+			if (exists($scope_conn_op->{$conn_op}) && defined($scope_conn_op->{$conn_op})) {
+				print "  -  Search Scope:          $scope_conn_op->{$conn_op}\n";
 				}	
+			if (exists($filter_conn_op->{$conn_op}) && defined($filter_conn_op->{$conn_op})) {
+				print "  -  Search Filter:         $filter_conn_op->{$conn_op}\n";
 			}
 		}
 	}
@@ -936,18 +898,19 @@ if ($verb eq "yes" || $usage =~ /f/ ){
 				$ds6loop++;
 			}
 		} else {
-			my $bindVal = $arrays->{binddn};
-			my $bindConn = $arrays->{bindconn};
-			my $bindOp = $arrays->{bindop};
-			my $badPasswordConn = $arrays->{badpwdconn};
-			my $badPasswordOp = $arrays->{badpwdop};
-			my $badPasswordIp = $arrays->{badpwdip};
+			# key is conn,op - val is binddn
+			my $bind_conn_op = $hashes->{bind_conn_op};
+			# key is conn,op - val is count
+			my $badpwd_conn_op = $hashes->{badpwd_conn_op};
+			# key is binddn - val is count
 			my %badPassword = ();
-			for (my $ii =0 ; $ii < $badPwdCount; $ii++){
-		 		for (my $i = 0; $i < $bindCount; $i++){
-					if ($badPasswordConn->[$ii] eq $bindConn->[$i] && $badPasswordOp->[$ii] eq $bindOp->[$i] ){
-						$badPassword{ $bindVal->[$i] }++;
-					}
+			my @badPasswordIp = ();
+			while (my ($conn_op, $count) = each %{$badpwd_conn_op}) {
+				my ($conn, $op) = split(",", $conn_op);
+				if (exists($bind_conn_op->{$conn_op}) && defined($bind_conn_op->{$conn_op})) {
+					my $binddn = $bind_conn_op->{$conn_op};
+					$badPassword{$binddn}++;
+					push @badPasswordIp, getIPfromConn($conn);
 		 		}
 			}
 			# sort the new hash of $badPassword{}
@@ -961,7 +924,7 @@ if ($verb eq "yes" || $usage =~ /f/ ){
 			}
 			print "\nFrom the IP address(s) :\n\n";
 			for (my $i=0; $i<$badPwdCount; $i++) {
-				print "\t\t$badPasswordIp->[$i]\n";
+				print "\t\t$badPasswordIp[$i]\n";
 			}
 			if ($bpTotal > $badPwdCount){
 				print "\n** Warning : Wrongly reported failed login attempts : ". ($bpTotal - $badPwdCount) . "\n";
@@ -1244,66 +1207,49 @@ if ($usage =~ /g/i || $verb eq "yes"){
 	my $abandonTotal = $srchCount + $delCount + $modCount + $addCount + $modrdnCount + $bindCount + $extopCount + $cmpCount;
 	if ($verb eq "yes" && $abandonCount > 0 && $abandonTotal > 0){
 		my $conn_hash = $hashes->{conn_hash};
+		my $abandon_conn_op = $hashes->{abandon_conn_op};
+		my $srch_conn_op = $hashes->{srch_conn_op};
+		my $del_conn_op = $hashes->{del_conn_op};
+		my $add_conn_op = $hashes->{add_conn_op};
+		my $mod_conn_op = $hashes->{mod_conn_op};
+		my $cmp_conn_op = $hashes->{cmp_conn_op};
+		my $mdn_conn_op = $hashes->{mdn_conn_op};
+		my $bind_conn_op = $hashes->{bind_conn_op};
+		my $unbind_conn_op = $hashes->{unbind_conn_op};
+		my $ext_conn_op = $hashes->{ext_conn_op};
 
 		print "\n\n----- Abandon Request Stats -----\n\n";
 
-		for (my $g = 0; $g < $abandonCount; $g++){
-			my $conn = $arrays->{targetconn}->[$g];
-			my $op = $arrays->{targetop}->[$g];
-			my $msgid = $arrays->{msgid}->[$g];
-			for (my $sc = 0; $sc < $srchCount; $sc++){
-				if (($arrays->{srchconn}->[$sc] && $arrays->{srchop}->[$sc]) && 
-				    ($arrays->{srchconn}->[$sc] eq $conn && $arrays->{srchop}->[$sc] eq $op )){
-					print " - SRCH conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";	
-				}
-			}
-			for (my $dc = 0; $dc < $delCount; $dc++){
-				if (($arrays->{delconn}->[$dc] && $arrays->{delop}->[$dc]) &&
-				    ($arrays->{delconn}->[$dc] eq $conn && $arrays->{delop}->[$dc] eq $op)){
-					print " - DEL  conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $adc = 0; $adc < $addCount; $adc++){
-				if (($arrays->{addconn}->[$adc] && $arrays->{addop}->[$adc]) &&
-				    ($arrays->{addconn}->[$adc] eq $conn && $arrays->{addop}->[$adc] eq $op)){
-					print " - ADD  conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $mc = 0; $mc < $modCount; $mc++){
-				if (($arrays->{modconn}->[$mc] && $arrays->{modop}->[$mc]) &&
-				    ($arrays->{modconn}->[$mc] eq $conn && $arrays->{modop}->[$mc] eq $op)){
-					print " - MOD  conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $cc = 0; $cc < $cmpCount; $cc++){
-				if (($arrays->{cmpconn}->[$cc] && $arrays->{cmpop}->[$cc]) &&
-				    ($arrays->{cmpconn}->[$cc] eq $conn && $arrays->{cmpop}->[$cc] eq $op)){
-					print " - CMP  conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $mdc = 0; $mdc < $modrdnCount; $mdc++){
-				if (($arrays->{modrdnconn}->[$mdc] && $arrays->{modrdnop}->[$mdc]) &&
-				    ($arrays->{modrdnconn}->[$mdc] eq $conn && $arrays->{modrdnop}->[$mdc] eq $op)){
-					print " - MODRDN conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $bcb = 0; $bcb < $bindCount; $bcb++){
-				if (($arrays->{bindconn}->[$bcb] && $arrays->{bindop}->[$bcb]) &&
-				    ($arrays->{bindconn}->[$bcb] eq $conn && $arrays->{bindop}->[$bcb] eq $op)){
-					print " - BIND conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $ubc = 0; $ubc < $unbindCount; $ubc++){
-				if (($arrays->{unbindconn}->[$ubc] && $arrays->{unbindop}->[$ubc]) &&
-				    ($arrays->{unbindconn}->[$ubc] eq $conn && $arrays->{unbindop}->[$ubc] eq $op)){
-					print " - UNBIND conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
-			}
-			for (my $ec = 0; $ec < $extopCount; $ec++){
-				if (($arrays->{extconn}->[$ec] && $arrays->{extop}->[$ec]) &&
-				    ($arrays->{extconn}->[$ec] eq $conn && $arrays->{extop}->[$ec] eq $op)){
-					print " - EXT  conn=$conn op=$op msgid=$msgid client=$conn_hash->{$conn}\n";
-				}
+		while (my ($conn_op, $targ_msgid) = each %{$abandon_conn_op}) {
+			my ($conn, $op) = split(",", $conn_op);
+			my ($targetop, $msgid) = split(",", $targ_msgid);
+			my $conn_targ = "$conn,$targetop";
+			my $clientIP;
+			if (exists($conn_hash->{$conn}) && defined($conn_hash->{$conn})) {
+				$clientIP = $conn_hash->{$conn};
+			} else {
+				$clientIP = "Unknown";
+			}
+			if (exists($srch_conn_op->{$conn_targ}) && defined($srch_conn_op->{$conn_targ})) {
+				print " - SRCH conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($del_conn_op->{$conn_targ}) && defined($del_conn_op->{$conn_targ})) {
+				print " - DEL  conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($add_conn_op->{$conn_targ}) && defined($add_conn_op->{$conn_targ})) {
+				print " - ADD  conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($mod_conn_op->{$conn_targ}) && defined($mod_conn_op->{$conn_targ})) {
+				print " - MOD  conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($cmp_conn_op->{$conn_targ}) && defined($cmp_conn_op->{$conn_targ})) {
+				print " - CMP  conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($mdn_conn_op->{$conn_targ}) && defined($mdn_conn_op->{$conn_targ})) {
+				print " - MODRDN conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($bind_conn_op->{$conn_targ}) && defined($bind_conn_op->{$conn_targ})) {
+				print " - BIND conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($unbind_conn_op->{$conn_targ}) && defined($unbind_conn_op->{$conn_targ})) {
+				print " - UNBIND conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} elsif (exists($ext_conn_op->{$conn_targ}) && defined($ext_conn_op->{$conn_targ})) {
+				print " - EXT  conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
+			} else {
+				print " - UNKNOWN conn=$conn op=$targetop msgid=$msgid client=$clientIP\n";
 			}
 		}
 	}
@@ -1666,58 +1612,57 @@ sub parseLineNormal
 			$anyAttrs++;
 		}
 		if ($verb eq "yes"){
-			if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{srchconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{srchop}}, $1;}
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{srch_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ DEL/){
 		$delCount++;
 		if($reportStats){ inc_stats('del',$s_stats,$m_stats); }
 		if ($verb eq "yes"){
-			if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{delconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{delop}}, $1;}
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{del_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ MOD dn=/){
 		$modCount++;
 		if($reportStats){ inc_stats('mod',$s_stats,$m_stats); }
 		if ($verb eq "yes"){
-		        if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{modconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{modop}}, $1; }
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{mod_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ ADD/){
 		$addCount++;
 		if($reportStats){ inc_stats('add',$s_stats,$m_stats); }
 		if ($verb eq "yes"){
-		        if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{addconn}}, $1; }
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{addop}}, $1; }
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{add_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ MODRDN/){
 		$modrdnCount++;
 		if($reportStats){ inc_stats('modrdn',$s_stats,$m_stats); }
 		if ($verb eq "yes"){
-		        if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{modrdnconn}}, $1; }
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{modrdnop}}, $1; }
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{mdn_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ CMP dn=/){
 		$cmpCount++;
 		if($reportStats){ inc_stats('cmp',$s_stats,$m_stats); }
 		if ($verb eq "yes"  || $usage =~ /g/i){
-			if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{cmpconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{cmpop}}, $1;}
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{cmp_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (m/ ABANDON /){
+		# there are two cases for abandon
+		# [17/Sep/2013:01:52:11 -0400] conn=1482074 op=4 ABANDON targetop=3 msgid=4
+		# [17/Sep/2013:01:52:11 -0400] conn=1482074 op=4 ABANDON targetop=NOTFOUND msgid=4
+		# if the op to be abandoned completes before the abandon request can be processed
+		# the server will use NOTFOUND as the op number
 		$abandonCount++;
 		if($reportStats){ inc_stats('abandon',$s_stats,$m_stats); }
 		$allResults++;
-		if ($_ =~ /targetop= *([0-9a-zA-Z]+)/i ){
-			push @{$arrays->{targetop}}, $1;
-			if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{targetconn}}, $1; }
-			if ($_ =~ /msgid= *([0-9\-]+)/i){ push @{$arrays->{msgid}}, $1; }
+		if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+) +ABANDON +targetop= *([0-9a-zA-Z]+) +msgid= *([0-9\-]+)/i ){
+			# abandon_conn_op - key is the conn,op of the ABANDON request
+			# the value is the targetop,msgid of the ABANDON request
+			$hashes->{abandon_conn_op}->{"$1,$2"} = "$3,$4"; # targetop,msgid
 		}
 	}
 	if (m/ VLV /){
@@ -1772,7 +1717,7 @@ sub parseLineNormal
 			my ($date, $hr, $min, $sec) = split (':', $time);
 			my ($day, $mon, $yr) = split ('/', $date);
 			$day =~ s/\[//;
-			$start_time_of_connection[$connID] = timegm($sec, $min, $hr, $day, $monthname{$mon}, $yr);
+			$hashes->{start_time_of_connection}->{$connID} = timegm($sec, $min, $hr, $day, $monthname{$mon}, $yr);
 		}
 	}
 	if (m/ SSL client bound as /){$sslClientBindCount++;}
@@ -1788,10 +1733,10 @@ sub parseLineNormal
 			# if we didn't see the start time of this connection
 			# i.e. due to truncation or log rotation
 			# then just set to 0
-			my $stoc = $start_time_of_connection[$connID] || 0;
-			$end_time_of_connection[$connID] = $gmtime || 0;
-			my $diff = $end_time_of_connection[$connID] - $stoc;
-			$start_time_of_connection[$connID] =  $end_time_of_connection[$connID] = 0;
+			my $stoc = $hashes->{start_time_of_connection}->{$connID} || 0;
+			$hashes->{end_time_of_connection}->{$connID} = $gmtime || 0;
+			my $diff = $hashes->{end_time_of_connection}->{$connID} - $stoc;
+			$hashes->{start_time_of_connection}->{$connID} = $hashes->{end_time_of_connection}->{$connID} = 0;
 			if ($diff <= 1) { $latency[0]++;}
 			if ($diff == 2) { $latency[1]++;}
 			if ($diff == 3) { $latency[2]++;}
@@ -1802,38 +1747,41 @@ sub parseLineNormal
 		}
 	}
 	if (m/ BIND/ && $_ =~ /dn=\"(.*)\" method/i ){
+		my $binddn = $1;
 		if($reportStats){ inc_stats('bind',$s_stats,$m_stats); }
 		$bindCount++;
-		if ($1 ne ""){ 
-			if($1 eq $rootDN){$rootDNBindCount++;}
-			$tmpp = $1;
+		my ($conn, $op);
+		if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){
+			$conn = $1;
+			$op = $2;
+		}
+		if ($binddn ne ""){
+			if($binddn eq $rootDN){$rootDNBindCount++;}
+			$tmpp = $binddn;
 			$tmpp =~ tr/A-Z/a-z/;
 			$hashes->{bindlist}->{$tmpp}++;
-			if ($_ =~ /conn= *([0-9A-Z]+)/i) { push @{$arrays->{bindconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i) { push @{$arrays->{bindop}}, $1;}
 			if($usage =~ /f/ || $verb eq "yes"){
-				push @{$arrays->{binddn}}, $tmpp;
+				$hashes->{bind_conn_op}->{"$conn,$op"} = $tmpp;
 			}
 		} else {
 			$anonymousBindCount++;
 			$hashes->{bindlist}->{"Anonymous Binds"}++;
-			if ($_ =~ /conn= *([0-9A-Z]+)/i) { push @{$arrays->{bindconn}}, $1;}
-			if ($_ =~ /op= *([0-9\-]+)/i) { push @{$arrays->{bindop}}, $1;}
-			push @{$arrays->{binddn}}, "";
+			if($usage =~ /f/ || $verb eq "yes"){
+				$hashes->{bind_conn_op}->{"$conn,$op"} = "";
+			}
 			inc_stats('anonbind',$s_stats,$m_stats);
 		}
 	}
 	if (m/ UNBIND/){
 		$unbindCount++;
 		if ($verb eq "yes"){
-		        if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{unbindconn}}, $1; }
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{unbindop}}, $1; }
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{unbind_conn_op}->{"$1,$2"}++;}
 		}
 	}
-	if (m/ RESULT err=/ && m/ notes=P/){
+	if (m/ RESULT err=/ && m/ notes=[A-Z,]*P/){
 		$pagedSearchCount++;
 	}
-	if (m/ notes=A/){
+	if (m/ notes=[A-Z,]*A/){
 		$con = "";
 		if ($_ =~ /conn= *([0-9A-Z]+)/i){
 		        $con = $1;
@@ -1847,19 +1795,16 @@ sub parseLineNormal
 			#  unindexed search stat, as VLV unindexed searches aren't that bad
 			$unindexedSrchCountNotesA++;
 			if($reportStats){ inc_stats('notesA',$s_stats,$m_stats); }
-		}
 		if ($usage =~ /u/ || $verb eq "yes"){
-			if ($isVlvNotes == 0 ){
-		        	if ($_ =~ /etime= *([0-9.]+)/i ){ push @{$arrays->{notesAetime}}, $1; }
-		        	if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{notesAconn}}, $1; }
-		        	if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{notesAop}}, $1; }
-		        	if ($_ =~ / *([0-9a-z:\/]+)/i){ push @{$arrays->{notesAtime}}, $1; }
-				if ($_ =~ /nentries= *([0-9]+)/i ){ push @{$arrays->{notesAnentries}}, $1; }
+				$hashes->{notesa_conn_op}->{"$con,$op"}++;
+				if ($_ =~ /etime= *([0-9.]+)/i ){ $hashes->{etime_conn_op}->{"$con,$op"} = $1; }
+				if ($_ =~ / *([0-9a-z:\/]+)/i){ $hashes->{time_conn_op}->{"$con,$op"} = $1; }
+				if ($_ =~ /nentries= *([0-9]+)/i ){ $hashes->{nentries_conn_op}->{"$con,$op"} = $1; }
 			}
 		}
 		$isVlvNotes = 0;
 	}
-	if (m/ notes=U/){
+	if (m/ notes=[A-Z,]*U/){
 		$con = "";
 		if ($_ =~ /conn= *([0-9A-Z]+)/i){
 		        $con = $1;
@@ -1873,14 +1818,11 @@ sub parseLineNormal
 			#  unindexed search stat, as VLV unindexed searches aren't that bad
 			$unindexedSrchCountNotesU++;
 			if($reportStats){ inc_stats('notesU',$s_stats,$m_stats); }
-		}
 		if ($usage =~ /u/ || $verb eq "yes"){
-			if ($isVlvNotes == 0 ){
-		        	if ($_ =~ /etime= *([0-9.]+)/i ){ push @{$arrays->{notesUetime}}, $1; }
-		        	if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{notesUconn}}, $1; }
-		        	if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{notesUop}}, $1; }
-		        	if ($_ =~ / *([0-9a-z:\/]+)/i){ push @{$arrays->{notesUtime}}, $1; }
-				if ($_ =~ /nentries= *([0-9]+)/i ){ push @{$arrays->{notesUnentries}}, $1; }
+				$hashes->{notesu_conn_op}->{"$con,$op"}++;
+				if ($_ =~ /etime= *([0-9.]+)/i ){ $hashes->{etime_conn_op}->{"$con,$op"} = $1; }
+				if ($_ =~ / *([0-9a-z:\/]+)/i){ $hashes->{time_conn_op}->{"$con,$op"} = $1; }
+				if ($_ =~ /nentries= *([0-9]+)/i ){ $hashes->{nentries_conn_op}->{"$con,$op"} = $1; }
 			}
 		}
 		$isVlvNotes = 0;
@@ -1951,7 +1893,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 					if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -1966,7 +1907,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -1981,7 +1921,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -1996,7 +1935,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 			       	$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2011,7 +1949,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no"; 
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2027,7 +1964,6 @@ sub parseLineNormal
 				$exc = "no";
 				$ip = getIPfromConn($1);
 				$maxBerSizeCount++;
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2042,7 +1978,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2057,7 +1992,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2072,7 +2006,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2087,7 +2020,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2102,7 +2034,6 @@ sub parseLineNormal
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) {
 				$exc = "no";
 				$ip = getIPfromConn($1);
-				if ($ip eq ""){$ip = "Unknown_Host";}
 				for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
 				        if ($ip eq $excludeIP[$xxx]){$exc = "yes";}
 				}
@@ -2131,8 +2062,7 @@ sub parseLineNormal
 		if ($_ =~ /oid=\" *([0-9\.]+)/i ){ $hashes->{oid}->{$1}++; }
 		if ($1 && $1 eq $startTLSoid){$startTLSCount++;}
 		if ($verb eq "yes"){
-		        if ($_ =~ /conn= *([0-9A-Z]+)/i){ push @{$arrays->{extconn}}, $1; }
-			if ($_ =~ /op= *([0-9\-]+)/i){ push @{$arrays->{extop}}, $1; }
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{ext_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (($usage =~ /l/ || $verb eq "yes") and / SRCH /){
@@ -2155,14 +2085,12 @@ sub parseLineNormal
 		$filterCount++;
 		if($usage =~ /u/ || $verb eq "yes"){
 			# we only need this for the unindexed search report
-			push @{$arrays->{filterval}}, $tmpp;
-			push @{$arrays->{filterconn}}, $filterConn;
-			push @{$arrays->{filterop}}, $filterOp;
+			$hashes->{filter_conn_op}->{"$filterConn,$filterOp"} = $tmpp;
 		}
 	}
 	if ($usage =~ /a/ || $verb eq "yes"){
 		if (/ SRCH /   && $_ =~ /base=\"(.*)\" scope/i ){
-			my ($baseConn, $baseOp, $scopeVal, $scopeConn, $scopeOp);
+			my ($conn, $op, $scopeVal);
 			if ($1 eq ""){
 				$tmpp = "Root DSE";
 			} else {
@@ -2177,21 +2105,15 @@ sub parseLineNormal
 				$scopeVal = $1; 
 			}
 			if ($_ =~ /conn= *([0-9A-Z]+)/i) { 
-				$baseConn = $1; 
-				$scopeConn = $1;	
+				$conn = $1;
 			}
 			if ($_ =~ /op= *([0-9\-]+)/i) { 
-				$baseOp = $1;
-				$scopeOp = $1;
+				$op = $1;
 			}
 			if($usage =~ /u/ || $verb eq "yes"){
 				# we only need this for the unindexed search report
-				push @{$arrays->{baseval}}, $tmpp;
-				push @{$arrays->{baseconn}}, $baseConn;
-				push @{$arrays->{baseop}}, $baseOp;
-				push @{$arrays->{scopeval}}, $scopeTxt[$scopeVal]; 
-				push @{$arrays->{scopeconn}}, $scopeConn; 
-				push @{$arrays->{scopeop}}, $scopeOp; 
+				$hashes->{base_conn_op}->{"$conn,$op"} = $tmpp;
+				$hashes->{scope_conn_op}->{"$conn,$op"} = $scopeTxt[$scopeVal];
 			}
 			$baseCount++;
 			$scopeCount++;
@@ -2210,15 +2132,8 @@ sub parseLineNormal
 			$ds6x = "true";
 			$badPwdCount++;
 		} elsif (/ err=49 tag=/ ){
-			if ($_ =~ /conn= *([0-9A-Z]+)/i ){
-				push @{$arrays->{badpwdconn}}, $1;
-				$ip = getIPfromConn($1);
 				$badPwdCount++;
-			}
-			if ($_ =~ /op= *([0-9\-]+)/i ){
-				push @{$arrays->{badpwdop}}, $1;
-			}
-			push @{$arrays->{badpwdip}}, $ip;
+			if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $hashes->{badpwd_conn_op}->{"$1,$2"}++;}
 		}
 	}
 	if (/ BIND / && /method=sasl/i){
@@ -2264,23 +2179,11 @@ reset_stats_block
     $stats->{'last'} = shift || 0;
     $stats->{'last_str'} = shift || '';
 
-    $stats->{'results'}=0;
-    $stats->{'srch'}=0;
-    $stats->{'add'}=0;
-    $stats->{'mod'}=0;
-    $stats->{'modrdn'}=0;
-    $stats->{'moddn'}=0;
-    $stats->{'cmp'}=0;
-    $stats->{'del'}=0;
-    $stats->{'abandon'}=0;
-    $stats->{'conns'}=0;
-    $stats->{'sslconns'}=0;
-    $stats->{'bind'}=0;
-    $stats->{'anonbind'}=0;
-    $stats->{'unbind'}=0;
-    $stats->{'notesA'}=0;
-    $stats->{'notesU'}=0;
-    $stats->{'etime'}=0;
+	for my $sn (@statnames) {
+		next if ($sn eq 'last' or $sn eq 'last_str');
+		$stats->{$sn}=0;
+	}
+
     return;
 }
 
@@ -2292,6 +2195,7 @@ new_stats_block
 		'active' => 0,
 	};
 	if ($name){
+		$stats = openHashFiles($dataLocation, @statnames);
 		$stats->{'filename'} = $name;
 		$stats->{'fh'} = new IO::File;
 		$stats->{'active'} = open($stats->{'fh'},">$name");
@@ -2471,21 +2375,6 @@ openHashFiles
 }
 
 sub
-openArrayFiles
-{
-	my $dir = shift;
-	my %arrays = ();
-	for my $an (@_) {
-		my @ary = (); # using my in inner loop will create brand new array every time through for tie
-		my $fn = "$dir/$an.logconv.db";
-		push @removefiles, $fn;
-		tie @ary, "DB_File", $fn, O_CREAT|O_RDWR, 0600, $DB_RECNO or do { openFailed($!, $fn) };
-		$arrays{$an} = \@ary;
-	}
-	return \%arrays;
-}
-
-sub
 removeDataFiles
 {
     if (!$needCleanup) { return ; }
@@ -2493,9 +2382,6 @@ removeDataFiles
 	for my $h (keys %{$hashes}) {
 		untie %{$hashes->{$h}};
 	}
-	for my $a (keys %{$arrays}) {
-		untie @{$arrays->{$a}};
-	}
 	for my $file (@removefiles) {
 		unlink $file;
 	}
@@ -2508,7 +2394,12 @@ sub
 getIPfromConn
 {
 	my $connid = shift;
+	if (exists($hashes->{conn_hash}->{$connid}) &&
+		defined($hashes->{conn_hash}->{$connid})) {
 	return $hashes->{conn_hash}->{$connid};
+	}
+
+	return "Unknown_Host";
 }
 
 #######################################
