Skip to content

Commit

Permalink
replace ps -xH with ps -eLf
Browse files Browse the repository at this point in the history
  • Loading branch information
macos committed Dec 26, 2019
1 parent ce4def5 commit 5e527ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clients/client-linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion clients/client-psutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e527ad

Please sign in to comment.