FreeBSD blackhole bug #1202

This commit is contained in:
nicolargo
2017-12-30 10:37:21 +01:00
parent f870ef85c2
commit 6300af04ad
2 changed files with 6 additions and 2 deletions

1
NEWS
View File

@@ -32,6 +32,7 @@ Bugs corrected:
* Electron/Atom processes displayed wrong in process list #1192
* Another encoding issue... With both Python 2 and Python 3 #1197
* Glances do not exit when eating 'q' #1207
* FreeBSD blackhole bug #1202
Backward-incompatible changes:

View File

@@ -229,6 +229,7 @@ class GlancesGrabSensors(object):
# psutil>=5.1.0 is required
self.stemps = psutil.sensors_temperatures()
except AttributeError:
logger.warning("Temperature sensors are only available on Linux")
logger.warning("PsUtil 5.1.0 or higher is needed to grab temperatures sensors")
except OSError as e:
# FreeBSD: If oid 'hw.acpi.battery' not present, Glances wont start #1055
@@ -243,15 +244,17 @@ class GlancesGrabSensors(object):
# psutil>=5.2.0 is required
self.sfans = psutil.sensors_fans()
except AttributeError:
logger.warning("Fan speed sensors are only available on Linux")
logger.warning("PsUtil 5.2.0 or higher is needed to grab fans sensors")
except OSError as e:
logger.error("Can not grab fans sensors ({})".format(e))
else:
self.init_fan = True
# !!! Disable Fan: High CPU consumption is PSUtil 5.2.0
# Delete the following line when corrected
# !!! Disable Fan: High CPU consumption with PSUtil 5.2.0 or higher
# Delete the two followings lines when corrected (https://github.com/giampaolo/psutil/issues/1199)
self.init_fan = False
logger.warning("Fan speed sensors disable (see https://github.com/giampaolo/psutil/issues/1199)")
# Init the stats
self.reset()