[Zodb-checkins] CVS: ZODB3/ZEO - monitor.py:1.2

Jeremy Hylton jeremy@zope.com
Thu, 9 Jan 2003 18:56:00 -0500


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv14437/ZEO

Modified Files:
	monitor.py 
Log Message:
Include server start time in monitor output.
zLog message just before server calls bind().


=== ZODB3/ZEO/monitor.py 1.1 => 1.2 ===
--- ZODB3/ZEO/monitor.py:1.1	Thu Jan  9 16:50:18 2003
+++ ZODB3/ZEO/monitor.py	Thu Jan  9 18:55:57 2003
@@ -13,7 +13,7 @@
 ##############################################################################
 """Monitor behavior of ZEO server and record statistics.
 
-$id:$
+$Id$
 """
 
 import asyncore
@@ -22,6 +22,7 @@
 import types
 
 import ZEO
+import zLOG
 
 class StorageStats:
     """Per-storage usage statistics."""
@@ -37,8 +38,10 @@
         self.lock_time = None
         self.conflicts = 0
         self.conflicts_resolved = 0
+        self.start = time.ctime()
 
     def dump(self, f):
+        print >> f, "Server started:", self.start
         print >> f, "Clients:", self.clients
         print >> f, "Clients verifying:", self.verifying_clients
         print >> f, "Active transactions:", self.active_txns
@@ -97,6 +100,7 @@
         else:
             self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
         self.set_reuse_addr()
+        zLOG.LOG("ZSM", zLOG.INFO, "monitor listening on %s" % repr(self.addr))
         self.bind(self.addr)
         self.listen(5)