|
|
dc8c34 |
From 7dee79c02350007ea22b8e1898035682395d3314 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
dc8c34 |
Date: Tue, 8 Jan 2013 12:16:14 -0500
|
|
|
dc8c34 |
Subject: [PATCH 122/225] Ticket 539 - logconv.pl should handle microsecond
|
|
|
dc8c34 |
timing
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Bug Description: logconv.pl can not handle microsecond etimes
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Fix Description: Update the regular expressions to handle the decimal point "."
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Also did a little code cleanup.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/539
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by: nhosoi(Thanks!)
|
|
|
dc8c34 |
(cherry picked from commit 8965dda8d4023ab36f0a404a874c657d78631e9d)
|
|
|
dc8c34 |
(cherry picked from commit 67c5f1cd1584cd352da7b8db2520c268431d7812)
|
|
|
dc8c34 |
(cherry picked from commit 6775316c1eae432c7b40fd6418f4f9993152b59b)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/admin/src/logconv.pl | 55 +++++++++++++++++++++--------------------------
|
|
|
dc8c34 |
1 file changed, 25 insertions(+), 30 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
|
|
|
dc8c34 |
index 94ba036..f5342af 100755
|
|
|
dc8c34 |
--- a/ldap/admin/src/logconv.pl
|
|
|
dc8c34 |
+++ b/ldap/admin/src/logconv.pl
|
|
|
dc8c34 |
@@ -948,36 +948,31 @@ if ($filter_count > 0){
|
|
|
dc8c34 |
# #
|
|
|
dc8c34 |
#########################################
|
|
|
dc8c34 |
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
-#
|
|
|
dc8c34 |
-# print most often etimes
|
|
|
dc8c34 |
-#
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
if ($usage =~ /t/i || $verb eq "yes"){
|
|
|
dc8c34 |
-print "\n\n----- Top $sizeCount Most Frequent etimes -----\n\n";
|
|
|
dc8c34 |
-$eloop = 0;
|
|
|
dc8c34 |
-foreach $et (sort { $etime{$b} <=> $etime{$a} } keys %etime) {
|
|
|
dc8c34 |
- if ($eloop == $sizeCount) { last; }
|
|
|
dc8c34 |
- if ($retime ne "2"){
|
|
|
dc8c34 |
- $first = $et;
|
|
|
dc8c34 |
- $retime = "2";
|
|
|
dc8c34 |
+ #
|
|
|
dc8c34 |
+ # print most often etimes
|
|
|
dc8c34 |
+ #
|
|
|
dc8c34 |
+ print "\n\n----- Top $sizeCount Most Frequent etimes -----\n\n";
|
|
|
dc8c34 |
+ $eloop = 0;
|
|
|
dc8c34 |
+ foreach $et (sort { $etime{$b} <=> $etime{$a} } keys %etime) {
|
|
|
dc8c34 |
+ if ($eloop == $sizeCount) { last; }
|
|
|
dc8c34 |
+ if ($retime ne "2"){
|
|
|
dc8c34 |
+ $first = $et;
|
|
|
dc8c34 |
+ $retime = "2";
|
|
|
dc8c34 |
+ }
|
|
|
dc8c34 |
+ printf "%-8s %-12s\n", $etime{ $et }, "etime=$et";
|
|
|
dc8c34 |
+ $eloop++;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
- printf "%-8s %-12s\n", $etime{ $et }, "etime=$et";
|
|
|
dc8c34 |
- $eloop++;
|
|
|
dc8c34 |
-}
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
-#
|
|
|
dc8c34 |
-# print longest etimes
|
|
|
dc8c34 |
-#
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
-print "\n\n----- Top $sizeCount Longest etimes -----\n\n";
|
|
|
dc8c34 |
-$eloop = 0;
|
|
|
dc8c34 |
-foreach $et (sort { $b <=> $a } (keys %etime)) {
|
|
|
dc8c34 |
- if ($eloop == $sizeCount) { last; }
|
|
|
dc8c34 |
- printf "%-12s %-10s\n","etime=$et",$etime{ $et };
|
|
|
dc8c34 |
- $eloop++;
|
|
|
dc8c34 |
-}
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
+ #
|
|
|
dc8c34 |
+ # print longest etimes
|
|
|
dc8c34 |
+ #
|
|
|
dc8c34 |
+ print "\n\n----- Top $sizeCount Longest etimes -----\n\n";
|
|
|
dc8c34 |
+ $eloop = 0;
|
|
|
dc8c34 |
+ foreach $et (sort { $b <=> $a } (keys %etime)) {
|
|
|
dc8c34 |
+ if ($eloop == $sizeCount) { last; }
|
|
|
dc8c34 |
+ printf "%-12s %-10s\n","etime=$et",$etime{ $et };
|
|
|
dc8c34 |
+ $eloop++;
|
|
|
dc8c34 |
+ }
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
#######################################
|
|
|
dc8c34 |
@@ -1651,7 +1646,7 @@ if (m/ notes=U/){
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
if ($usage =~ /u/ || $verb eq "yes"){
|
|
|
dc8c34 |
if ($v eq "0" ){
|
|
|
dc8c34 |
- if ($_ =~ /etime= *([0-9]+)/i ) {
|
|
|
dc8c34 |
+ if ($_ =~ /etime= *([0-9.]+)/i ) {
|
|
|
dc8c34 |
$notesEtime[$vet]=$1;
|
|
|
dc8c34 |
$vet++;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -1931,7 +1926,7 @@ if ($_ =~ /err= *([0-9]+)/i){
|
|
|
dc8c34 |
if ($1 ne "0"){ $errorck++;}
|
|
|
dc8c34 |
else { $errorsucc++;}
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
-if ($_ =~ /etime= *([0-9]+)/i ) { $etime{$1}++;}
|
|
|
dc8c34 |
+if ($_ =~ /etime= *([0-9.]+)/ ) { $etime{$1}++;}
|
|
|
dc8c34 |
if ($_ =~ / tag=101 nentries= *([0-9]+)/i ) {$nentries{$1}++}
|
|
|
dc8c34 |
if ($_ =~ / tag=111 nentries= *([0-9]+)/i ) {$nentries{$1}++}
|
|
|
dc8c34 |
if ($_ =~ / tag=100 nentries= *([0-9]+)/i ) {$nentries{$1}++}
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.8.1.4
|
|
|
dc8c34 |
|