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

No Sensor Information Available using a Raspberry Pi #1310

Closed
PolynomialDivision opened this issue Jul 26, 2018 · 5 comments
Closed

No Sensor Information Available using a Raspberry Pi #1310

PolynomialDivision opened this issue Jul 26, 2018 · 5 comments

Comments

@PolynomialDivision
Copy link

Hi,
if I call

psutil.sensors_temperatures()

on a raspberry pi 3, the result is always

{}

Is there no information about CPU temperature?

@giampaolo
Copy link
Owner

Probably not due to /sys/class/hwmon/hwmon* directory structure not existing on raspberrypy (try to check)

@vzorglub
Copy link

The directory structure '/sys/class/hwmon/hwmon*` does not exits on the raspberry pi.
The processor temperature can be obtained with:

cat /sys/class/thermal/thermal_zone0/temp in mC

I don't have a Pi2 or Pi3 to test multicore

@giampaolo
Copy link
Owner

Re-opening. The goal should be to inspect /sys/class/thermal/ tree in case /sys/class/hwmon does not exist.

@giampaolo giampaolo reopened this Sep 26, 2018
@amanusk
Copy link
Collaborator

amanusk commented Sep 26, 2018

@giampaolo I tried looking into this a few days ago.
There was a discussion about this in lm-sensors: #30, that can be used as a reference.
Also:

  • I could not find a way to obtain high and critical temperatures from /sys/class/thermal/
  • Although raspberry-pi has 4 cores reported by psutil.cpu_count(), there is only a file for sys/class/thermal/thermal_zone0/

Other than that, I could give this a try :)

@giampaolo
Copy link
Owner

Please do. If there's no way to obtain high and critical just set them to None.

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

4 participants