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

Can't find '/sys/class/hwmon/hwmon1/device/name' #1245

Closed
DariaD opened this issue Mar 13, 2018 · 6 comments
Closed

Can't find '/sys/class/hwmon/hwmon1/device/name' #1245

DariaD opened this issue Mar 13, 2018 · 6 comments

Comments

@DariaD
Copy link

DariaD commented Mar 13, 2018

Good morning,

I was using an utility which refer to psutil and suddenly got:
IOError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon1/device/name'

I'm not sure what exactly going on and if it's really a psutil problem.
Really appreciate any help!

>>> import psutil
>>> psutil.sensors_temperatures()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/psutil/__init__.py", line 2195, in sensors_temperatures
    rawdict = _psplatform.sensors_temperatures()
  File "/usr/lib64/python2.7/site-packages/psutil/_pslinux.py", line 1154, in sensors_temperatures
    binary=False)
  File "/usr/lib64/python2.7/site-packages/psutil/_pslinux.py", line 295, in cat
    with open_binary(fname) if binary else open_text(fname) as f:
  File "/usr/lib64/python2.7/site-packages/psutil/_pslinux.py", line 201, in open_text
    return open(fname, "rt", **kwargs)
IOError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon1/device/name'

I use Python 2 if it's mater.

@DariaD
Copy link
Author

DariaD commented Mar 13, 2018

Also, I use CentOS.

@giampaolo
Copy link
Owner

Can you please paste the output of sensors command? Not sure about CentOS but on Ubuntu you install it with sudo apt install lm-sensors.

@DariaD
Copy link
Author

DariaD commented Mar 13, 2018

Dear Giampaolo,
thank you for your reply.

I've got this:

i350bb-pci-0403
Adapter: PCI adapter
loc1:         +54.0°C  (high = +120.0°C, crit = +110.0°C)

power_meter-acpi-0
Adapter: ACPI interface
power1:        0.00 W  (interval = 300.00 s)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +48.0°C  (high = +86.0°C, crit = +96.0°C)
Core 0:         +40.0°C  (high = +86.0°C, crit = +96.0°C)
Core 1:         +41.0°C  (high = +86.0°C, crit = +96.0°C)
Core 2:         +41.0°C  (high = +86.0°C, crit = +96.0°C)
Core 3:         +46.0°C  (high = +86.0°C, crit = +96.0°C)
Core 4:         +43.0°C  (high = +86.0°C, crit = +96.0°C)
Core 5:         +41.0°C  (high = +86.0°C, crit = +96.0°C)
Core 8:         +40.0°C  (high = +86.0°C, crit = +96.0°C)
Core 9:         +41.0°C  (high = +86.0°C, crit = +96.0°C)
Core 10:        +40.0°C  (high = +86.0°C, crit = +96.0°C)
Core 11:        +41.0°C  (high = +86.0°C, crit = +96.0°C)
Core 12:        +42.0°C  (high = +86.0°C, crit = +96.0°C)
Core 13:        +42.0°C  (high = +86.0°C, crit = +96.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Physical id 1:  +76.0°C  (high = +86.0°C, crit = +96.0°C)
Core 0:         +72.0°C  (high = +86.0°C, crit = +96.0°C)
Core 1:         +72.0°C  (high = +86.0°C, crit = +96.0°C)
Core 2:         +72.0°C  (high = +86.0°C, crit = +96.0°C)
Core 3:         +70.0°C  (high = +86.0°C, crit = +96.0°C)
Core 4:         +71.0°C  (high = +86.0°C, crit = +96.0°C)
Core 5:         +70.0°C  (high = +86.0°C, crit = +96.0°C)
Core 8:         +72.0°C  (high = +86.0°C, crit = +96.0°C)
Core 9:         +71.0°C  (high = +86.0°C, crit = +96.0°C)
Core 10:        +70.0°C  (high = +86.0°C, crit = +96.0°C)
Core 11:        +71.0°C  (high = +86.0°C, crit = +96.0°C)
Core 12:        +67.0°C  (high = +86.0°C, crit = +96.0°C)
Core 13:        +68.0°C  (high = +86.0°C, crit = +96.0°C)

@giampaolo
Copy link
Owner

Can you please try to install latest GIT version of psutil and then run this script and paste the output?
https://github.com/giampaolo/psutil/blob/master/scripts/sensors.py

@DariaD
Copy link
Author

DariaD commented Mar 13, 2018

P.S. for CentOS:

$ yum install lm_sensors

@DariaD
Copy link
Author

DariaD commented Mar 13, 2018

Giampaolo,
The output is:

/usr/lib64/python2.7/site-packages/psutil-5.4.4-py2.7-linux-x86_64.egg/psutil/_pslinux.py:1153: RuntimeWarning: ignoring IOError(2, 'No such file or directory')
  warnings.warn("ignoring %r" % err, RuntimeWarning)
i350bb
    Temperatures:
        loc1                 54.0°C (high=120.0°C, critical=110.0°C)
coretemp
    Temperatures:
        Physical id 0        49.0°C (high=86.0°C, critical=96.0°C)
        Core 8               42.0°C (high=86.0°C, critical=96.0°C)
        Core 9               41.0°C (high=86.0°C, critical=96.0°C)
        Core 10              41.0°C (high=86.0°C, critical=96.0°C)
        Core 11              41.0°C (high=86.0°C, critical=96.0°C)
        Core 12              42.0°C (high=86.0°C, critical=96.0°C)
        Core 13              42.0°C (high=86.0°C, critical=96.0°C)
        Core 0               41.0°C (high=86.0°C, critical=96.0°C)
        Core 1               42.0°C (high=86.0°C, critical=96.0°C)
        Core 2               41.0°C (high=86.0°C, critical=96.0°C)
        Core 3               46.0°C (high=86.0°C, critical=96.0°C)
        Core 4               45.0°C (high=86.0°C, critical=96.0°C)
        Core 5               43.0°C (high=86.0°C, critical=96.0°C)
        Physical id 1        78.0°C (high=86.0°C, critical=96.0°C)
        Core 8               73.0°C (high=86.0°C, critical=96.0°C)
        Core 9               72.0°C (high=86.0°C, critical=96.0°C)
        Core 10              71.0°C (high=86.0°C, critical=96.0°C)
        Core 11              72.0°C (high=86.0°C, critical=96.0°C)
        Core 12              68.0°C (high=86.0°C, critical=96.0°C)
        Core 13              70.0°C (high=86.0°C, critical=96.0°C)
        Core 0               73.0°C (high=86.0°C, critical=96.0°C)
        Core 1               77.0°C (high=86.0°C, critical=96.0°C)
        Core 2               73.0°C (high=86.0°C, critical=96.0°C)
        Core 3               70.0°C (high=86.0°C, critical=96.0°C)
        Core 4               73.0°C (high=86.0°C, critical=96.0°C)
        Core 5               73.0°C (high=86.0°C, critical=96.0°C)

Thank you, now it works although there is a warning. For me it works! Thank you!

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