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

armbianmonitor - CPU temperature missing #839

Closed
pfeerick opened this issue Dec 5, 2017 · 5 comments
Closed

armbianmonitor - CPU temperature missing #839

pfeerick opened this issue Dec 5, 2017 · 5 comments

Comments

@pfeerick
Copy link
Contributor

pfeerick commented Dec 5, 2017

The [ ! -z "${SocTemp##*[0-9]*}" ] test added in a recent commit 5cb346e#diff-9f87e1c4632903d6962052a358acebe1 to armbianmonitor has broken the temperature readings. Confirmed on at least three boards - OrangePiZero/legacy (me), pine64/legacy and odroidxu4/next (tkaiser).

Basically, at the time the test is done at https://github.com/armbian/build/blob/master/packages/bsp/common/usr/bin/armbianmonitor#L346, the variable being used as a flag to indicate if the cputemp stuff should be done, and doesn't contain a valid temperature reading, so fails every time. It's not until the subsequent line that the script attempts to load the temperature data, so if it was wanted, it would have to be placed further down and wrap around https://github.com/armbian/build/blob/master/packages/bsp/common/usr/bin/armbianmonitor#L348-L351, and there will be decimals involved at some point. The updatemotd code that was in that commit works fine though.

The corresponding test for the PMIC will probably break also.
https://github.com/armbian/build/blob/master/packages/bsp/common/usr/bin/armbianmonitor#L353

@ThomasKaiser
Copy link
Contributor

Obviously only tested with /etc/update-motd.d/30-sysinfo and not armbianmonitor. Due to missing comments I also fail to understand in which situations the code should do what so simply proposing to either start to communicate (add comments to code/commits so others understand later why stuff happened) or simply removing this stuff from armbianmonitor again. Preferably prior to 5.37 release.

@igorpecovnik
Copy link
Member

I am on the way to fix this.

@pfeerick
Copy link
Contributor Author

pfeerick commented Dec 5, 2017

Oh dear... I don't think Thomas will let you hear the end of this one for a while Igor! The fix is to remove the code which probably didn't get tested! At least the 🐛 has been 🔨 so now you can have 🍺 :-D :-D :-D

@enzeperix
Copy link

Hello . I have noticed this problem again on ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.14-sunxi64 .
I use it on some Orange Pi Prime SBCs and on 80% of them for some reason the file /etc/armbianmonitor/datasources/soctemp is missing . I tried to see what process is supposed to write in that file on a board which has the "soctemp" file but i couldn't find any . Sorry i'm new to Orange Pi and Armbian, if you need more info i can provide it :)

@pfeerick
Copy link
Contributor Author

pfeerick commented Mar 23, 2018

IIRC there is a daemon service that does some background data collection (think this is the relevant bit?). /etc/armbianmonitor/datasources/soctemp is just a link which points to the true soctemp value elsewhere in the virtual sys file system (just means the armbianmonitor script doens't have to deal will all the different possible locations of the info).

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

No branches or pull requests

5 participants