diff options
Diffstat (limited to 'get-client-cpu-mem.py')
-rw-r--r-- | get-client-cpu-mem.py | 2 |
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] |