[Zope-Checkins] CVS: ZODB3/Tools - zeoserverlog.py:1.1.2.3

Tim Peters tim.one at comcast.net
Wed Aug 27 17:26:05 EDT 2003


Update of /cvs-repository/ZODB3/Tools
In directory cvs.zope.org:/tmp/cvs-serv23500

Modified Files:
      Tag: ZODB3-3_1-branch
	zeoserverlog.py 
Log Message:
Another newer version emailed by Jim.


=== ZODB3/Tools/zeoserverlog.py 1.1.2.2 => 1.1.2.3 ===
--- ZODB3/Tools/zeoserverlog.py:1.1.2.2	Wed Aug 27 16:24:34 2003
+++ ZODB3/Tools/zeoserverlog.py	Wed Aug 27 16:26:05 2003
@@ -492,6 +492,40 @@
                 d = sub(t1, time(line))
                 print cid, t1, n, d, n and (d*1000.0/n) or '-'
 
+def recovery(f):
+    f, = f
+
+    if f == '-':
+        f = sys.stdin
+    else:
+        f = xopen(f)
+
+    last = ''
+    trans = []
+    n = 0
+    for line in f:
+        n += 1
+        if line.find('RecoveryServer') < 0:
+            continue
+        l = line.find('sending transaction ')
+        if l > 0 and last.find('sending transaction ') > 0:
+            trans.append(line[l+20:].strip())
+        else:
+            if trans:
+                if len(trans) > 1:
+                    print "  ... %s similar records skipped ..." % (
+                        len(trans) - 1)
+                    print n, last.strip()
+                trans=[]
+            print n, line.strip()
+        last = line
+
+    if len(trans) > 1:
+        print "  ... %s similar records skipped ..." % (
+            len(trans) - 1)
+        print n, last.strip()
+
+
 
 if __name__ == '__main__':
     globals()[sys.argv[1]](sys.argv[2:])




More information about the Zope-Checkins mailing list