Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

command line test puller

  • Loading branch information...
commit 4a4eb6008d4b036742021995b270a23fa0ab422f 1 parent 4a7e34e
@dballard authored
Showing with 27 additions and 0 deletions.
  1. +27 −0 cmdline.py
View
27 cmdline.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+import socket
+import json
+import time
+
+while True:
+ try:
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ sock.connect(('', 6000))
+ data = sock.recv(10000)
+ sock.close()
+ #print data
+ stats = json.loads(data)
+ for stat in stats["Stats"]:
+ print "%s: %f" % (stat["type"] ,stat["value"])
+ print "----"
+ time.sleep(1)
+ except KeyboardInterrupt:
+ print "\nExiting..."
+ break
+ except:
+ print "\nError..."
+ break
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.