mirror of
https://github.com//cppla/ServerStatus
synced 2025-07-13 21:42:21 +08:00
replace ps -xH with ps -eLf
This commit is contained in:
parent
ce4def5c87
commit
5e527ad369
@ -145,7 +145,7 @@ def tupd():
|
||||
u = int(s[:-1])-1
|
||||
s = subprocess.check_output("ps -ef|wc -l", shell=True)
|
||||
p = int(s[:-1])-2
|
||||
s = subprocess.check_output("ps -xH|wc -l", shell=True)
|
||||
s = subprocess.check_output("ps -eLf|wc -l", shell=True)
|
||||
d = int(s[:-1])-2
|
||||
return t,u,p,d
|
||||
|
||||
|
@ -111,7 +111,7 @@ def tupd():
|
||||
t = int(os.popen('ss -t|wc -l').read()[:-1])-1
|
||||
u = int(os.popen('ss -u|wc -l').read()[:-1])-1
|
||||
p = int(os.popen('ps -ef|wc -l').read()[:-1])-2
|
||||
d = int(os.popen('ps -xH|wc -l').read()[:-1])-2
|
||||
d = int(os.popen('ps -eLf|wc -l').read()[:-1])-2
|
||||
else:
|
||||
t = int(os.popen('netstat -an|find "TCP" /c').read()[:-1])-1
|
||||
u = int(os.popen('netstat -an|find "UDP" /c').read()[:-1])-1
|
||||
|
Loading…
x
Reference in New Issue
Block a user