diff options
author | drebs <drebs@riseup.net> | 2016-05-01 21:26:12 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2016-05-01 21:50:44 -0300 |
commit | ec9fec4fd18f0530828f13228a81bdafa72dbfe6 (patch) | |
tree | 0252031a5c37b731cc4cfeb1958f6534925cc5bc /get_client_cpu_mem.py | |
parent | a4b80ff24950b927fa30baa9996609ee13e47c83 (diff) |
add phases
Diffstat (limited to 'get_client_cpu_mem.py')
-rw-r--r-- | get_client_cpu_mem.py | 4 |
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 |