From 6300af04aded7541ee31bc2eba581b52cfbc08ff Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 30 Dec 2017 10:37:21 +0100 Subject: [PATCH] FreeBSD blackhole bug #1202 --- NEWS | 1 + glances/plugins/glances_sensors.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 71b80b68..652c6eee 100644 --- a/NEWS +++ b/NEWS @@ -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: diff --git a/glances/plugins/glances_sensors.py b/glances/plugins/glances_sensors.py index 7251a3aa..15d155e0 100644 --- a/glances/plugins/glances_sensors.py +++ b/glances/plugins/glances_sensors.py @@ -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()