From 46def9acb2bfa638aea7d232e514f2dabd743479 Mon Sep 17 00:00:00 2001 From: ubuntu Date: Tue, 28 Aug 2018 17:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=A8=E5=B9=B3=E5=8F=B0=E7=9A=84=E4=B8=A2?= =?UTF-8?q?=E5=8C=85=E7=8E=87=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/client-psutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/client-psutil.py b/clients/client-psutil.py index f700e6f..0d5cc86 100755 --- a/clients/client-psutil.py +++ b/clients/client-psutil.py @@ -126,14 +126,14 @@ def get_network(ip_version): lostRate = {} def _ping_thread(host, mark): - output = os.popen('ping %s -t &' % host) + output = os.popen('ping -O %s &' % host if 'linux' in sys.platform else 'ping %s -t &' % host) lostCount = 0 allCount = 0 startTime = time.time() output.readline() output.readline() while True: - if 'TTL' not in output.readline(): + if 'TTL' not in output.readline().upper(): lostCount += 1 allCount += 1 lostRate[mark] = "%.4f" % (float(lostCount) / allCount)