mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-05 07:09:49 +08:00
fix a bug
This commit is contained in:
parent
db825f050c
commit
96a4654857
@ -171,7 +171,7 @@ def _ping_thread(host, mark):
|
||||
if 'ttl' not in output.readline():
|
||||
lostCount += 1
|
||||
allCount += 1
|
||||
lostRate[mark] = "%.4f" % (float(lostCount) / allCount)
|
||||
lostRate[mark] = float(lostCount) / allCount
|
||||
endTime = time.time()
|
||||
if endTime-startTime > 3600:
|
||||
lostCount = 0
|
||||
@ -252,6 +252,7 @@ if __name__ == '__main__':
|
||||
|
||||
traffic = Traffic()
|
||||
traffic.get()
|
||||
get_packetLostRate()
|
||||
while 1:
|
||||
CPU = get_cpu()
|
||||
NetRx, NetTx = traffic.get()
|
||||
|
@ -140,7 +140,7 @@ def _ping_thread(host, mark):
|
||||
if 'TTL' not in output.readline().upper():
|
||||
lostCount += 1
|
||||
allCount += 1
|
||||
lostRate[mark] = "%.4f" % (float(lostCount) / allCount)
|
||||
lostRate[mark] = float(lostCount) / allCount
|
||||
endTime = time.time()
|
||||
if endTime-startTime > 3600:
|
||||
lostCount = 0
|
||||
@ -221,6 +221,7 @@ if __name__ == '__main__':
|
||||
|
||||
traffic = Traffic()
|
||||
traffic.get()
|
||||
get_packetLostRate()
|
||||
while 1:
|
||||
CPU = get_cpu()
|
||||
NetRx, NetTx = traffic.get()
|
||||
|
Loading…
x
Reference in New Issue
Block a user