You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I face the following issue running psutil (5.3.1) used by glances v2.11.1. Might be related to #990 .
glances -d gives the following:
2017-09-22 02:28:48,483 -- CRITICAL -- Error while initializing the sensors plugin ([Errno 2] No such file or directory: '/sys/class/hwmon/hwmon2/fan4_input')
2017-09-22 02:28:48,484 -- ERROR -- Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 117, in _load_plugin
self._plugins[name] = plugin.Plugin(args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_sensors.py", line 53, in __init__
self.glancesgrabsensors = GlancesGrabSensors()
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_sensors.py", line 245, in __init__
self.sfans = psutil.sensors_fans()
File "/usr/local/lib/python2.7/dist-packages/psutil/__init__.py", line 2298, in sensors_fans
return _psplatform.sensors_fans()
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 1193, in sensors_fans
current = int(cat(base + '_input'))
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 298, in cat
with open_binary(fname) if binary else open_text(fname) as f:
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 190, in open_binary
return open(fname, "rb", **kwargs)
IOError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon2/fan4_input'
Output in python:
>>> psutil.sensors_fans()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/psutil/__init__.py", line 2298, in sensors_fans
return _psplatform.sensors_fans()
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 1193, in sensors_fans
current = int(cat(base + '_input'))
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 298, in cat
with open_binary(fname) if binary else open_text(fname) as f:
File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 190, in open_binary
return open(fname, "rb", **kwargs)
IOError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon2/fan4_input'
>>>
The problem is how psutil tries to read the fans:
/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py
basenames = glob.glob('/sys/class/hwmon/hwmon*/fan*_*')
basenames = sorted(set([x.split('_')[0] for x in basenames]))
for base in basenames:
unit_name = cat(os.path.join(os.path.dirname(base), 'name'),
binary=False)
label = cat(base + '_label', fallback='', binary=False)
current = int(cat(base + '_input'))
ret[unit_name].append(_common.sfan(label, current))
return dict(ret)
And here's the output of sensors which is working except cpu fan rpm of 0:
(edit: actually the rpm 0 is fine as well, as I only have one fan (fan2) connected.)
I face the following issue running psutil (5.3.1) used by glances v2.11.1. Might be related to #990 .
glances -d gives the following:
Output in python:
The problem is how psutil tries to read the fans:
/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py
as there is a fan4_* but no fan4_input:
And here's the output of
sensors
which is working except cpu fan rpm of 0:(edit: actually the rpm 0 is fine as well, as I only have one fan (fan2) connected.)
Because of this error there is no sensors information at all in glances :(
The text was updated successfully, but these errors were encountered: