summaryrefslogtreecommitdiff
path: root/get_client_cpu_mem.py
diff options
context:
space:
mode:
Diffstat (limited to 'get_client_cpu_mem.py')
-rw-r--r--get_client_cpu_mem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/get_client_cpu_mem.py b/get_client_cpu_mem.py
index ba5049a..fe1aeec 100644
--- a/get_client_cpu_mem.py
+++ b/get_client_cpu_mem.py
@@ -2,10 +2,10 @@ import commands
import urllib
import psutil
-pid = urllib.urlopen('http://localhost:8080/pid').read()
+pid, phase = urllib.urlopen('http://localhost:8080/stats').read().split()
res = commands.getoutput("ps -p " + pid + " -o \%cpu,\%mem")
splitted = res.split()
cpu = splitted[2]
mem = splitted[3]
-print cpu, mem
+print cpu, mem, phase