Update system_api.py

pull/568/head
Mr Chen 1 year ago
parent dfe7becdb1
commit d6f43a86c9
  1. 7
      class/core/system_api.py

@ -556,8 +556,7 @@ class system_api:
ntime = time.time() ntime = time.time()
print("source",ntime - session['otime']) # print("source",ntime - session['otime'])
networkInfo = {} networkInfo = {}
networkInfo['upTotal'] = networkIo[0] networkInfo['upTotal'] = networkIo[0]
networkInfo['downTotal'] = networkIo[1] networkInfo['downTotal'] = networkIo[1]
@ -587,7 +586,6 @@ class system_api:
def getNetWorkIostat(self): def getNetWorkIostat(self):
netInfo = {} netInfo = {}
netInfo['ALL'] = {} netInfo['ALL'] = {}
netInfo['ALL']['up'] = 0 netInfo['ALL']['up'] = 0
netInfo['ALL']['down'] = 0 netInfo['ALL']['down'] = 0
@ -611,8 +609,7 @@ class system_api:
stime = mtime - netio['time'] stime = mtime - netio['time']
if not stime: stime = 1 if not stime: stime = 1
print("new:",stime) # print("new:",stime)
netio_group = psutil.net_io_counters(pernic=True).keys() netio_group = psutil.net_io_counters(pernic=True).keys()
netio_cache = netio['info'] netio_cache = netio['info']

Loading…
Cancel
Save