Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
macos committed May 27, 2020
1 parent ba5914a commit 3d71ce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/client-psutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def tupd():
:return:
'''
try:
if 'linux' in sys.platform:
if sys.platform.startswith("linux") is True:
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 -eLf|wc -l').read()[:-1])-2
elif 'win' in sys.platform:
elif sys.platform.startswith("win") is True:
t = int(os.popen('netstat -an|find "TCP" /c').read()[:-1])-1
u = int(os.popen('netstat -an|find "UDP" /c').read()[:-1])-1
p = len(psutil.pids())
Expand Down

0 comments on commit 3d71ce1

Please sign in to comment.