xxxserxxx / gotop

A terminal based graphical activity monitor inspired by gtop and vtop
Other
2.77k stars 142 forks source link

No Temperatures shown with Raspberry Pi #6

Closed xxxserxxx closed 3 years ago

xxxserxxx commented 4 years ago

Hi, I'm testing gotop Version 1.4.0 on a pi zero w with the latest image of Raspian Strech Lite. The only problem I have is that no Temperatures are shown.

Regards

Original ticket: https://github.com/cjbassi/gotop/issues/37
Original poster: @NuggTV
Additional input: @PrivateGER, @staranto, @pgaskin, @santosh, @TheWorms, @siduxdevil, @JPUnD

xxxserxxx commented 4 years ago

Hi, can you test this binary and tell me if any temperatures are shown now? I compiled that from the issue-37 branch so feel free to run that branch with the go tools instead if you want.

xxxserxxx commented 4 years ago

Hi, just testet the new binary. Still no Temperatures shown

xxxserxxx commented 4 years ago

Thanks for testing that. Since that didn't work, that means the issue is coming from one of gotop's dependencies called gopsutil. Gonna have to create an issue over there and get back to you.

xxxserxxx commented 4 years ago

Hey, are there any updates on this? I have the same problem with my Raspberry Pi with a fresh image.

xxxserxxx commented 4 years ago

Sorry, not updates yet. If you could give me the output of uname -a that would help tho.

xxxserxxx commented 4 years ago

Output is: Linux Server-Raspberry-Pi 4.14.61-v7+ #1133 SMP Fri Aug 10 11:04:43 BST 2018 armv7l GNU/Linux

xxxserxxx commented 4 years ago

Thanks, and actually if you could give me the Raspberry Pi model # too that would be awesome.

xxxserxxx commented 4 years ago

It's a Raspberry Pi Model 3 B+.

xxxserxxx commented 4 years ago

Same issue here with...

3B+ (Linux pi99 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l GNU/Linux) 3B (Linux pi3 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux).

The gotop binary is from download.sh in commit 5b5ccfc2f55bb6257558f8859538a3bc2179316d.

xxxserxxx commented 4 years ago

This is because the temperatures for the RPi need to be retrieved using vcgencmd measure_temp or /sys/class/thermal/thermal_zone0/temp, and gopsutil gets the temperature using /sys/class/hwmon. The RPi does not support hwmon.

xxxserxxx commented 4 years ago

I'm also facing this issue of temperature not being shown. I'm on Fedora 29 with zsh on Konsole (default settings).

xxxserxxx commented 4 years ago

@santosh Are you on a raspberry pi? If so, could you give its model and the output of uname -a? And if not, then feel free to create a new issue for your given hardware/software configuration.

xxxserxxx commented 4 years ago

same error, no temperatures shown

Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux Raspbian

xxxserxxx commented 4 years ago

Is there any perspective of this being fixed any time soon? I run into it with Raspbian Buster on a Pi4. Planning on writing an article for Gotop for a Linux magazine. But no temps specially on RasPi seems like a showstopper for now.

Linux raspberrypi 4.19.57-v7l+ #1244 SMP Thu Jul 4 18:48:07 BST 2019 armv7l GNU/Linux

xxxserxxx commented 3 years ago

@NuggTV, @PrivateGER, @staranto, @pgaskin, @santosh, @TheWorms, @siduxdevil, @JPUnD:

If any of you are still using gotop and Raspberry(s), can you confirm that this issue still exists? gopsutils has had numerous version bumps since the last comment by @siduxdevil

Lomanic commented 3 years ago

@xxxserxxx Please check this comment https://github.com/shirou/gopsutil/issues/391#issuecomment-522347311 you may have to adjust gotop as it seems to still only discriminate against _input values, excluding _thermal ones on Raspberry Pi/hosts without hwmon.

xxxserxxx commented 3 years ago

@Lomanic -- how arbitrary are the strings produced by gopsutil? Checking for one magic string is suspicious; adding a variety of suffixes that could indicate temperature sensors seems suboptimal. Do you know if gopsutils is going to continue adding different suffixes for things-that-are-thermal-sensors?

Follow-up: In this comment you mention that the change wasn't made; does this mean that _thermal keys were not added? I don't have access to a Pi -- what keys are gopsutil returning now? It looks like psutil is still using _input. Are you able to confirm?

Lomanic commented 3 years ago

gopsutil returns the same strings as psutil https://github.com/shirou/gopsutil/issues/391#issuecomment-621837149 (I cannot verify this again for the moment), we aligned with psutil in https://github.com/shirou/gopsutil/pull/861

xxxserxxx commented 3 years ago

Ok. There are no _thermal values returned for AMD64+Linux, only _input. If I'm understanding the (go)psutil threads, on Raspberry Pi (ARM+Linux?) the suffixes are instead _thermal. Do you know if there are other variations for other platforms?

Lomanic commented 3 years ago

Thermal zones are only used as a fallback on hosts lacking hwmon, the labels in /sys/class/thermal/thermal_zone*/type are quite random, for example on my amd64 laptop, cat /sys/class/thermal/thermal_zone*/type returns

acpitz
INT3400 Thermal
TSKN
NGFF
pch_skylake
B0D4
iwlwifi_1
x86_pkg_temp
xxxserxxx commented 3 years ago

Isn't the issue that -- for hwmon -- each device returns multiple sensor values; us downstream projects have to choose one of these to represent the "current temp." For hwmon, that's *_input. For thermal zones, there's a more simple .../temp value, e.g. /sys/class/thermal/thermal_zone0/temp.

In other words, on your amd64 laptop, you have 8 zones, which would explode into, I don't know, something like 48 different hwmon K/V pairs, one of which is *_input and represents the current temperature. For thermal zone systems, psutil ... what ... adds _thermal to the key that holds the value of .../temp?