Browse Source

removed old stats-collector directory

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@650 e5f2f494-b856-4b98-b285-d166d9295462
Kazunori Fujiwara 15 years ago
parent
commit
236a747b73

+ 0 - 6
src/bin/stats-collector/unittest/boss-shutdown.py

@@ -1,6 +0,0 @@
-#!/usr/bin/python
-
-import ISC
-cc = ISC.CC.Session()
-cc.group_subscribe("Boss")
-cc.group_sendmsg({ "command":"shutdown"},"Boss")

+ 0 - 57
src/bin/stats-collector/unittest/test-agent.py

@@ -1,57 +0,0 @@
-#!/usr/bin/python
-
-# This program acts statistics agent.
-# It has pseudo counters which is incremented each 10 second and
-# sends data to "statistics" channel periodically.
-# One command is available
-#   "Boss"       group: "shutdown"
-
-import ISC
-import time
-import select
-import random
-
-step_time = 10
-statgroup = "statistics"
-
-cc = ISC.CC.Session()
-print (cc.lname)
-#cc.group_subscribe(statgroup)
-cc.group_subscribe("Boss")
-
-# counters
-
-AUTH={}
-AUTH['counterid'] = 0
-AUTH['requestv4'] = 2
-AUTH['requestv6'] = 1
-SYS={}
-SYS['sockets'] = 0
-SYS['memory'] = 0
-
-sent = -1
-last_sent = -1
-loop = 0
-
-while 1:
-    wait = sent + step_time - time.time()
-    if wait <= 0:
-        last_sent = sent;
-        sent = time.time();
-        msg = {'component':'auth', 'version':1, 'timestamp':time.time(),'stats':{'AUTH':AUTH,'SYS':SYS}}
-        print (msg)
-        print (cc.group_sendmsg(msg, statgroup))
-        wait = last_sent + step_time - time.time()
-        if wait < 0:
-            wait = step_time
-        loop += 1
-    r,w,e = select.select([cc._socket],[],[], wait)
-    for sock in r:
-        if sock == cc._socket:
-            data,envelope = cc.group_recvmsg(False)
-            print (data)
-            if (envelope["group"] == "Boss"):
-                if ("shutdown" in data):
-                    exit()
-            else:
-                print ("Unknown data: ", envelope,data)