temprtaure module doesnt work
paradox-sp opened this issue · 6 comments
sensors command shows the temperatures but motd doesnt show the temperature
Fixed this in my fork https://github.com/paradox-sp/fancy-motd
Unfortunately, your version does not work correctly on my machine, whereas mine does.
For reference, this is my sensors version:
❯ sensors -v
sensors version 3.6.0+git with libsensors version 3.6.0+git
And this is relevant sensors output on my machine:
Core 0: +40.0°C (high = +100.0°C, crit = +100.0°C)
Core 4: +41.0°C (high = +100.0°C, crit = +100.0°C)
Core 8: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 12: +41.0°C (high = +100.0°C, crit = +100.0°C)
Core 16: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 20: +40.0°C (high = +100.0°C, crit = +100.0°C)
Core 24: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 25: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 26: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 27: +38.0°C (high = +100.0°C, crit = +100.0°C)
Core 28: +43.0°C (high = +100.0°C, crit = +100.0°C)
Core 29: +43.0°C (high = +100.0°C, crit = +100.0°C)
Core 30: +43.0°C (high = +100.0°C, crit = +100.0°C)
Core 31: +43.0°C (high = +100.0°C, crit = +100.0°C)
It's probably a matter of differing output between sensors versions. It would be probably possible to figure out a code to handle both of them. It would be helpful if you posted your version and how the output looks on your machine.
Maybe I'll look into it in a spare time, but I don't promise anything. PRs always welcome 😉
Mine didn't work either.
Debian box.
sensors version 3.6.0 with libsensors version 3.6.0
If i try the sensors grep line on the cli i get an issue with the symbols not showing up, running as motd the temp isn't showing up at all.
I fixed it with:
cores="$(sensors | grep Core | awk '{printf "%s ", $3} {printf "%s %s %s\n", $6, $9, $12}' | tr -d '+°,' | sed 's/)//')"
If this warrants a PR let me know and i'll do one :)
I'm having the same issue
in my case i had to do: cores="$(sensors | grep Tctl | awk '{printf "%s ", $2}' | tr -d '+°,' | sed 's/)//')"