summaryrefslogtreecommitdiff
path: root/get-client-cpu-mem.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-04-08 14:54:06 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-04-08 14:54:06 -0400
commit9f5d4c8c3d40f0f9b8959afdb8bd2c80e3935829 (patch)
tree38143ccdb3bd72cb618c9c37f6cbe5e4ae14b6b9 /get-client-cpu-mem.py
parent02c6b0ed8843e7863de13489d53f39c032f49e5f (diff)
fixed graphing
Diffstat (limited to 'get-client-cpu-mem.py')
-rw-r--r--get-client-cpu-mem.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/get-client-cpu-mem.py b/get-client-cpu-mem.py
index 0dd1aac..7dc9f26 100644
--- a/get-client-cpu-mem.py
+++ b/get-client-cpu-mem.py
@@ -1,6 +1,6 @@
import commands
-pid = commands.getoutput('ps x | grep "[s]erver-solsync" | cut -d " " -f 2')
+pid = commands.getoutput('ps x | grep "server-solsync" | head -n 1 | cut -d " " -f 2')
res = commands.getoutput("ps -p " + pid + " -o \%cpu,\%mem")
splitted = res.split()
cpu = splitted[2]