mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-14 03:50:10 -04:00
Add control on psutil.net_io_counters / Bug on some Debian distrib
This commit is contained in:
@@ -1391,10 +1391,16 @@ class GlancesStats:
|
||||
|
||||
if psutil_net_io_counters:
|
||||
# psutil >= 1.0.0
|
||||
get_net_io_counters = psutil.net_io_counters(pernic=True)
|
||||
try:
|
||||
get_net_io_counters = psutil.net_io_counters(pernic=True)
|
||||
except IOError:
|
||||
self.network_error_tag = True
|
||||
else:
|
||||
# psutil < 1.0.0
|
||||
get_net_io_counters = psutil.network_io_counters(pernic=True)
|
||||
try:
|
||||
get_net_io_counters = psutil.network_io_counters(pernic=True)
|
||||
except IOError:
|
||||
self.network_error_tag = True
|
||||
|
||||
if not hasattr(self, 'network_old'):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user