Commit 2bbcc351 authored by Kazunori Fujiwara's avatar Kazunori Fujiwara
Browse files

Changed output to file "statistics.out".


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/f2f200910@266 e5f2f494-b856-4b98-b285-d166d9295462
parent 14f0c667
......@@ -6,15 +6,20 @@
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 = []
counter = []
......@@ -33,7 +38,7 @@ while 1:
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 @@ while 1:
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"]
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment