CPU Temp suggestion #24

Open
jdarnold opened this Issue Sep 26, 2012 · 6 comments

Projects

None yet

3 participants

@jdarnold

I suggest changing the last sed when getting the cpu temperature to get rid of a .x temps. So it would be:

sensors -f | grep 'Core 0' | awk '{print $3}' | sed 's/+//' | sed 's/..//g'

instead of s/.0//g at the end.

@android-808
Collaborator

I'll add this to the list. We've played with this several times before, with every attempt having some kind of shortfall.

@helmuthdu
Owner

I have fixed this in the last commit, check out. ( at least worked for me)

@android-808
Collaborator

Testing here is a little harder, lm-sensors/coretemp never worked right. For example it has just gone 28 to 6 in a second, but hey at least it's not negative today.

The only issue I'm seeing at the moment is the lack of oC or oF.

@jdarnold

Hmm, I don't think that is right. Looks like the sed got changed to :

sed 's/.0.*//'

which says to match any a string that is any character followed by a zero, followed by all the rest of the characters.

@android-808
Collaborator

See what I mean, always some small technicality :p

@android-808
Collaborator

Currently I'm trying out

sed 's/.[0-9]//g'

This should match any '.' and any following numbers only, leaving the temperature units in place. Please test it as my laptop isn't correctly supported by lmsensors. Either that or my cooling system is ridiculously good inside (4oC now, -2 on boot)

Only issue is it breaks alignment

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