Glances' sensors plug-in: “No such file or directory: '/sys/class/hwmon/hwmon0/device/name'”

129 views
Skip to first unread message

Franck Dernoncourt

unread,
Mar 15, 2017, 12:23:03 PM3/15/17
to Glances Users

I use Glances (mirror) to monitor on my computer (Ubuntu 14.04.5 LTS x64 + Glances==2.8.5).

After installing the sensors (mirror) plug-in, I get this error message whenever I tried to run sudo glances:

mlee@server:~$ sudo glances
Traceback (most recent call last):
  File "/usr/local/bin/glances", line 11, in <module>
    load_entry_point('Glances==2.8.5', 'console_scripts', 'glances')()
  File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 225, in main
    start_standalone(config=config, args=args)
  File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 105, in start_standalone
    standalone = GlancesStandalone(config=config, args=args)
  File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 43, in __init__
    self.stats = GlancesStats(config=config, args=args)
  File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 43, in __init__
    self.load_modules(self.args)
  File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 77, in load_modules
    self.load_plugins(args=args)
  File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 105, in load_plugins
    self._plugins[plugin_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 229, in __init__
    self.stemps = psutil.sensors_temperatures()
  File "/usr/local/lib/python2.7/dist-packages/psutil/__init__.py", line 2212, in sensors_temperatures
    rawdict = _psplatform.sensors_temperatures()
  File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 1108, in sensors_temperatures
    binary=False)
  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 204, in open_text
    return open(fname, "rt", **kwargs)
IOError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon0/device/name'

I tried:

sudo apt-get install -y lm-sensors
sudo apt-get install -y hddtemp
sudo pip install PsUtil

It didn't help. What do I need to do so that /sys/class/hwmon/hwmon0/device/name contains something that satisfies glances?


Output of sensor:

mlee@server:~$ sensors
power_meter-acpi-0
Adapter: ACPI interface
power1:      290.00 W  (interval =   1.00 s)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +35.0°C  (high = +92.0°C, crit = +102.0°C)
Core 0:         +26.0°C  (high = +92.0°C, crit = +102.0°C)
Core 2:         +30.0°C  (high = +92.0°C, crit = +102.0°C)
Core 3:         +35.0°C  (high = +92.0°C, crit = +102.0°C)
Core 4:         +28.0°C  (high = +92.0°C, crit = +102.0°C)
Core 8:         +25.0°C  (high = +92.0°C, crit = +102.0°C)
Core 10:        +26.0°C  (high = +92.0°C, crit = +102.0°C)
Core 11:        +32.0°C  (high = +92.0°C, crit = +102.0°C)
Core 12:        +28.0°C  (high = +92.0°C, crit = +102.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Physical id 1:  +34.0°C  (high = +92.0°C, crit = +102.0°C)
Core 0:         +31.0°C  (high = +92.0°C, crit = +102.0°C)
Core 2:         +27.0°C  (high = +92.0°C, crit = +102.0°C)
Core 3:         +26.0°C  (high = +92.0°C, crit = +102.0°C)
Core 4:         +26.0°C  (high = +92.0°C, crit = +102.0°C)
Core 8:         +26.0°C  (high = +92.0°C, crit = +102.0°C)
Core 10:        +33.0°C  (high = +92.0°C, crit = +102.0°C)
Core 11:        +29.0°C  (high = +92.0°C, crit = +102.0°C)
Core 12:        +26.0°C  (high = +92.0°C, crit = +102.0°C)
Upgrading to the latest version Glances==2.8.8 did not help.


Thanks,
Franck

Nicolargo

unread,
Oct 18, 2017, 4:12:21 PM10/18/17
to Glances Users
It's a PsUtil issue, try to upgrade it:

# pip install --upgrade psutil


Reply all
Reply to author
Forward
0 new messages