This commit is contained in:
aozhiwei 2019-11-28 15:00:23 +08:00
parent f291af8a65
commit ee633e6ff8

View File

@ -29,8 +29,7 @@ def getExeCmdLine(pid):
return os.popen('cat /proc/%d/cmdline' % int(pid)).read() return os.popen('cat /proc/%d/cmdline' % int(pid)).read()
def stop(instance_id, node_id, progname): def stop(instance_id, node_id, progname):
wsproxy_ids = getRuningProgramPids(progname) pids = getRuningProgramPids(progname)
pids = wsproxy_ids
for pid in pids: for pid in pids:
exepath = getExePath(pid) exepath = getExePath(pid)
cmdline = getExeCmdLine(pid) cmdline = getExeCmdLine(pid)
@ -38,8 +37,7 @@ def stop(instance_id, node_id, progname):
os.popen('kill -9 %d' % int(pid)) os.popen('kill -9 %d' % int(pid))
def listServer(progname): def listServer(progname):
wsproxy_ids = getRuningProgramPids(progname) pids = getRuningProgramPids(progname)
pids = wsproxy_ids
for pid in pids: for pid in pids:
exepath = getExePath(pid) exepath = getExePath(pid)
cmdline = getExeCmdLine(pid) cmdline = getExeCmdLine(pid)