[svn] commit: r266 - /branches/f2f200910/src/bin/statistics-test/collector.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Oct 30 22:57:48 UTC 2009
Author: fujiwara
Date: Fri Oct 30 22:57:48 2009
New Revision: 266
Log:
Changed output to file "statistics.out".
Modified:
branches/f2f200910/src/bin/statistics-test/collector.py
Modified: branches/f2f200910/src/bin/statistics-test/collector.py
==============================================================================
--- branches/f2f200910/src/bin/statistics-test/collector.py (original)
+++ branches/f2f200910/src/bin/statistics-test/collector.py Fri Oct 30 22:57:48 2009
@@ -6,14 +6,19 @@
import ISC
import time
import select
+import sys
+import os
step_time = 1
statgroup = "statistics"
cc = ISC.CC.Session()
-print (cc.lname)
+# print (cc.lname)
cc.group_subscribe(statgroup)
cc.group_subscribe("Boss")
+
+f = open('statistics.out', 'a')
+sys.stdout = f
server_by_name = {}
server_by_id = []
@@ -33,7 +38,7 @@
if wait <= 0:
sent = time.time();
command = { "command": "getstat", "sent":time.time() }
- print ("loop=", loop, " SEND: ", command)
+ #print ("loop=", loop, " SEND: ", command)
cc.group_sendmsg(command, "statistics")
wait = last_sent + step_time - time.time()
if wait < 0:
@@ -56,6 +61,7 @@
print ("server",id," time=",data["sent"], end=" "),
print ("counter=", data["counter"], end=" ")
print ("dT=", delta_t, " dC=", delta_c)
+ sys.stdout.flush()
timestamp[id] = data["sent"]
counter[id] = data["counter"]
#
More information about the bind10-changes
mailing list