mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-23 09:11:49 +03:00
chg: network - handle alerts with instant updates
Seems to happen only on windows as of now
This commit is contained in:
parent
ef3fe253fb
commit
19f3968ce4
@ -268,6 +268,10 @@ class Plugin(GlancesPlugin):
|
||||
# Add specifics information
|
||||
# Alert
|
||||
for i in self.get_raw():
|
||||
if i['time_since_update'] == 0:
|
||||
# Skip alert if no timespan to measure
|
||||
continue
|
||||
|
||||
if_real_name = i['interface_name'].split(':')[0]
|
||||
# Convert rate in bps (to be able to compare to interface speed)
|
||||
bps_rx = int(i['rx'] // i['time_since_update'] * 8)
|
||||
|
Loading…
Reference in New Issue
Block a user