Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to read unavailable sensor tempretures #991

Closed
darthbanana13 opened this issue Mar 18, 2017 · 0 comments
Closed

Trying to read unavailable sensor tempretures #991

darthbanana13 opened this issue Mar 18, 2017 · 0 comments

Comments

@darthbanana13
Copy link

darthbanana13 commented Mar 18, 2017

When I start glances on my Dell 9550 it gives me the following error:

Traceback (most recent call last):
  File "/usr/local/bin/glances", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/glances/__init__.py", line 225, in main
    start_standalone(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/__init__.py", line 105, in start_standalone
    standalone = GlancesStandalone(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/standalone.py", line 43, in __init__
    self.stats = GlancesStats(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py",line 43, in __init__
    self.load_modules(self.args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py",line 77, in load_modules
    self.load_plugins(args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py",line 105, in load_plugins
    self._plugins[plugin_name] = plugin.Plugin(args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/plugins/glances_sensors.py", line 53, in __init__
    self.glancesgrabsensors = GlancesGrabSensors()
  File "/usr/local/lib/python3.5/dist-packages/glances/plugins/glances_sensors.py", line 229, in __init__
    self.stemps = psutil.sensors_temperatures()
  File "/usr/local/lib/python3.5/dist-packages/psutil/__init__.py", line 2212, in sensors_temperatures
    rawdict = _psplatform.sensors_temperatures()
  File "/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py", line 1110, in sensors_temperatures
    current = float(cat(base + '_input')) / 1000.0
  File "/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py", line 299, in cat
    return f.read().strip()
OSError: [Errno 19] No such device

I have tried versions of psutil from 2.0 up to 5.2 and it would start crashing from 5.1 (including). Although in 5.1 the error would be different (from the battery status):

Traceback (most recent call last):
  File "/usr/local/bin/glances", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/glances/__init__.py", line 225, in main
    start_standalone(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/__init__.py", line 105, in start_standalone
    standalone = GlancesStandalone(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/standalone.py", line 43, in __init__
    self.stats = GlancesStats(config=config, args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py", line 43, in __init__
    self.load_modules(self.args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py", line 77, in load_modules
    self.load_plugins(args=args)
  File "/usr/local/lib/python3.5/dist-packages/glances/stats.py", line 96, in load_plugins
    plugin = __import__(os.path.basename(item)[:-3])
  File "/usr/local/lib/python3.5/dist-packages/glances/plugins/glances_sensors.py", line 26, in <module>
    from glances.plugins.glances_batpercent import Plugin as BatPercentPlugin
  File "/usr/local/lib/python3.5/dist-packages/glances/plugins/glances_batpercent.py", line 38, in <module>
    psutil.sensors_battery()
  File "/usr/local/lib/python3.5/dist-packages/psutil/__init__.py", line 2246, in sensors_battery
    return _psplatform.sensors_battery()
  File "/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py", line 1112, in sensors_battery
    energy_now = int(cat(root + "/energy_now"))
  File "/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py", line 288, in cat
    f = open_binary(fname) if binary else open_text(fname)
  File "/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py", line 187, in open_binary
    return open(fname, "rb", **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/power_supply/BAT0/energy_now'

but i think this is related to another issue. From 5.1.1 the error would look the same. This is the output of sensors in my terminal:

~  sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +34.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:         +31.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:         +32.0°C  (high = +100.0°C, crit = +100.0°C)
Core 2:         +30.0°C  (high = +100.0°C, crit = +100.0°C)
Core 3:         +32.0°C  (high = +100.0°C, crit = +100.0°C)

acpitz-virtual-0
Adapter: Virtual device
temp1:        +25.0°C  (crit = +107.0°C)

iwlwifi-virtual-0
Adapter: Virtual device
temp1:        +31.0°C

nouveau-pci-0100
Adapter: PCI adapter
GPU core:     +0.60 V  (min =  +0.60 V, max =  +1.20 V)
temp1:            N/A  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

Update:

Can confirm it is no longer a problem after installing the proprietary nvidia driver because lm-sensors can't find any nvidia thermal sensors. So basically this is a problem for Optimus laptops that use nouveau.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants