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

Glances is not showing sensors information. #1087

Closed
mtebbens opened this issue May 14, 2017 · 16 comments

Comments

@mtebbens
Copy link

commented May 14, 2017

Glances is not displaying any sensor information, although sensors is correctly installed and working.

Glances v2.3 with psutil v3.4.2

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

$ sensors
iwlwifi-virtual-0
Adapter: Virtual device
temp1: +43.0°C

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +40.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +41.0°C (high = +100.0°C, crit = +100.0°C)

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

dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 0 RPM
CPU: +42.0°C
Ambient: +41.0°C
SODIMM: +41.0°C
GPU: N/A

pch_skylake-virtual-0
Adapter: Virtual device
temp1: +40.0°C
$

$ more glances.log
2017-05-13 23:41:54,538 -- INFO -- Start Glances 2.3
2017-05-13 23:41:54,539 -- INFO -- CPython 3.5.2 and PSutil 3.4.2 detected
2017-05-13 23:41:54,541 -- INFO -- Read configuration file '/etc/glances/glances.conf'
2017-05-13 23:41:54,541 -- INFO -- Start standalone mode
2017-05-13 23:41:54,621 -- INFO -- Extended stats for top process are disabled (default behavior)
2017-05-13 23:42:18,783 -- INFO -- Stop Glances (with CTRL-C)
$

@nicolargo

This comment has been minimized.

Copy link
Owner

commented May 14, 2017

Hi @mtebbens ,

Glances 2.3 is an old version. Best way to solve the issue is uninstall it and reinstall the latest one (following this procedure).

Nevertheless, if you do not want to upgrade it, it should work if you have installed the Python Sensors libs:

pip install https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz
@ledroide

This comment has been minimized.

Copy link

commented Jun 12, 2017

Same problem here, running Glances v2.10 with psutil v5.2.2 : glances displays no sensors except "battery".
Hddtemp libs are installed, pysensors also, and the utility "sensors" displays correct information about cpu temperature and fan speed.
I have tried "pip install https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz" but it makes glances fail at launch, I had to remove py3sensors to make it back.

@nicolargo

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2017

@ledroide Glances 2.10 do not use anymore the Py3sensors plugin. It uses the PsUtil sensors functions available in the version 5.2 or higher.

So you need to upgrade youe PSUtil lib:

sudo pip install --upgrade psutil

It should solve your issue.

@ledroide

This comment has been minimized.

Copy link

commented Jun 13, 2017

@nicolargo : psutil is the latest version, already checked :
Requirement already up-to-date: psutil

Name: psutil
Version: 5.2.2

image

@nicolargo

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2017

@ledroide : can you send me the result of the following command line:

$ python
> import psutil
> psutil.sensors_temperatures()
> psutil.sensors_fans()
> psutil.sensors_battery()

Thanks

@ledroide

This comment has been minimized.

Copy link

commented Jun 13, 2017

@nicolargo : tried with python 2.7 and python 3.5, I get the same No such device error regarding function sensors_temperatures

jujube@gailuron:~ $ python2.7
Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensors_temperatures()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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 1123, in sensors_temperatures
    current = float(cat(base + '_input')) / 1000.0
  File "/usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py", line 299, in cat
    return f.read().strip()
IOError: [Errno 19] No such device
>>> psutil.sensors_fans()
{'asus': [sfan(label='cpu_fan', current=2300)]}
>>> psutil.sensors_battery()
sbattery(percent=96.25, secsleft=-2, power_plugged=True)
>>> 
jujube@gailuron:~ $ python3.5
Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensors_temperatures()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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 1123, 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
>>> psutil.sensors_fans()
{'asus': [sfan(label='cpu_fan', current=2300)]}
>>> psutil.sensors_battery()
sbattery(percent=96.25, secsleft=<BatteryTime.POWER_TIME_UNLIMITED: -2>, power_plugged=True)
>>> 

Meanwhile, believing the sensors utility :

jujube@gailuron:~ $ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +53.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:        +46.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:        +49.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:        +46.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:        +49.0°C  (high = +84.0°C, crit = +100.0°C)

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

asus-isa-0000
Adapter: ISA adapter
cpu_fan:     2300 RPM
temp1:        +53.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)
@nicolargo

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2017

Looks like a PsUtil issue... @giampaolo what do you think ?

@giampaolo

This comment has been minimized.

Copy link

commented Jun 13, 2017

OK, I should have fixed this:
giampaolo/psutil#1101

@nicolargo

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2017

Thanks @giampaolo !

@nicolargo nicolargo closed this Jun 13, 2017

@waldyd

This comment has been minimized.

Copy link

commented Aug 3, 2017

Hello,

Glances is not showing sensors informations on Fedora 26:

image

The log file is prompting:

[waldyd@planead525 ~]$ pip install pystache
Requirement already satisfied: pystache in ./.local/lib/python2.7/site-packages
[waldyd@planead525 ~]$ rm /tmp/glances.log 
[waldyd@planead525 ~]$ cat /tmp/glances.log| more
2017-08-03 13:03:28,999 -- INFO -- Start Glances 2.7.1
2017-08-03 13:03:28,999 -- INFO -- CPython 3.6.2 and PSutil 5.0.1 detected
2017-08-03 13:03:29,003 -- INFO -- Start standalone mode
2017-08-03 13:03:29,106 -- WARNING -- PyStache lib not installed (action script with mustache will not work)

The sensors and hddtemp utils are OK:

[waldyd@planead525 ~]$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +57.0°C  (crit = +99.0°C)
temp2:        +57.0°C  (crit = +99.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +57.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +57.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +56.0°C  (high = +100.0°C, crit = +100.0°C)

[waldyd@planead525 ~]$ hddtemp 
/dev/sda: XXXX: 43°C
/dev/sdb: XXXX:  drive supported, but it doesn't have a temperature sensor.

PSutil is also OK:

[waldyd@planead525 ~]$ python
Python 2.7.13 (default, Jun 26 2017, 10:20:05) 
[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensors_temperatures()
{'acpitz': [shwtemp(label='', current=59.0, high=99.0, critical=99.0), shwtemp(label='', current=59.0, high=99.0, critical=99.0)], 'coretemp': [shwtemp(label='Package id 0', current=57.0, high=100.0, critical=100.0), shwtemp(label='Core 0', current=57.0, high=100.0, critical=100.0), shwtemp(label='Core 1', current=56.0, high=100.0, critical=100.0)]}
>>> psutil.sensors_fans()
{}
>>> psutil.sensors_battery()
>>> 

Would you please give me any ideas to solve this issue?

Beforehand thanks.

@gdanov

This comment has been minimized.

Copy link

commented Sep 21, 2017

Same problem here, psutils are ok

`~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import psutil
psutil.sensors_temperatures()
{'coretemp': [shwtemp(label='Core 0', current=49.0, high=100.0, critical=100.0), shwtemp(label='Core 1', current=46.0, high=100.0, critical=100.0)], 'nct6776': [shwtemp(label='SYSTIN', current=45.0, high=0.0, critical=None), shwtemp(label='CPUTIN', current=50.5, high=80.0, critical=80.0), shwtemp(label='AUXTIN', current=7.5, high=80.0, critical=80.0), shwtemp(label='PCH_CHIP_TEMP', current=0.0, high=None, critical=None), shwtemp(label='PCH_CPU_TEMP', current=0.0, high=None, critical=None), shwtemp(label='PCH_MCH_TEMP', current=0.0, high=None, critical=None)]}
psutil.sensors_fans()
{'nct6776': [sfan(label='', current=0), sfan(label='', current=0), sfan(label='', current=729)]}
`

Description: Ubuntu 16.04.3 LTS

@ledroide

This comment has been minimized.

Copy link

commented Sep 26, 2017

Just upgraded to glances 2.11.1 and psutil 5.3.1 (on ubuntu zesty) : sensors working now. Thanks guys.
image

@adamelliotfields

This comment has been minimized.

Copy link

commented Apr 23, 2018

Ubuntu 16.04, running into this issue as well. glances v2.11.1 and psutil v5.4.5. Only happening on my laptop - haven't tried other machines.

psutil.sensors_temperatures() throws this:

/usr/local/lib/python3.5/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(5, 'Input/output error') for file '/sys/class/hwmon/hwmon2/temp1_input' RuntimeWarning)

I installed glances and psutil using pip3. This created a Python script at /usr/local/bin/glances. I added a line to always append --disabled-sensors to the arguments list.

  #!/usr/bin/python3

  # -*- coding: utf-8 -*-
  import re
  import sys

  from glances import main

  if __name__ == '__main__':
      sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
+     sys.argv.append('--disable-sensors')
      sys.exit(main())

It's definitely a band-aid, not a fix, but it works for now :octocat:

@zerolugithub

This comment has been minimized.

Copy link

commented May 27, 2018

Ubuntu 18.04, running into this issue as well.Glances v2.11.1 with psutil v5.4.5. Only happening on my laptop - haven't tried other machines.

psutil.sensors_temperatures()
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp12_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp13_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp14_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp15_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp16_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp6_input'
RuntimeWarning)
/usr/local/lib/python3.6/dist-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(6, 'No such device or address') for file '/sys/class/hwmon/hwmon1/temp8_input'
RuntimeWarning)

@rocketraman

This comment has been minimized.

Copy link

commented Jul 12, 2018

Having this problem also, on Fedora 27. This seems to have started just recently. I don't actually care that the sensors information is not showing. The real problem is that the error from the python module keeps printing to the screen every few seconds, and corrupts the glances display.

The error is:

/usr/lib64/python2.7/site-packages/psutil/_pslinux.py:1150: RuntimeWarning: ignoring IOError(100, 'Network is down')

The psutil output:

# python
Python 2.7.15 (default, May 15 2018, 15:37:31) 
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensors_temperatures()
/usr/lib64/python2.7/site-packages/psutil/_pslinux.py:1150: RuntimeWarning: ignoring IOError(100, 'Network is down')
  warnings.warn("ignoring %r" % err, RuntimeWarning)
{'k10temp': [shwtemp(label='', current=47.625, high=70.0, critical=70.0), shwtemp(label='', current=47.625, high=70.0, critical=70.0)], 'radeon': [shwtemp(label='', current=50.0, high=None, critical=None)]}
>>> 
>>> psutil.sensors_fans()
{'asus': [sfan(label='cpu_fan', current=0)]}
>>> psutil.sensors_battery()
>>>
@kircal

This comment has been minimized.

Copy link

commented Jul 20, 2018

I have the same problem on Ubuntu 18.04.
Python 3.6.5
Glances 2.11.1 with PSutil 5.4.6

Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import psutil
psutil.sensors_temperatures()
/home/kircal/.local/lib/python3.6/site-packages/psutil/_pslinux.py:1160: RuntimeWarning: ignoring OSError(22, 'Invalid argument') for file '/sys/class/hwmon/hwmon0/temp1_input'
RuntimeWarning)
{'pch_skylake': [shwtemp(label='', current=36.5, high=None, critical=None)], 'coretemp': [shwtemp(label='Package id 0', current=40.0, high=100.0, critical=100.0), shwtemp(label='Core 0', current=40.0, high=100.0, critical=100.0), shwtemp(label='Core 1', current=38.0, high=100.0, critical=100.0)]}
psutil.sensors_fans()
/home/kircal/.local/lib/python3.6/site-packages/psutil/_pslinux.py:1199: RuntimeWarning: ignoring OSError(19, 'No such device')
warnings.warn("ignoring %r" % err, RuntimeWarning)
{}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.