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

constant temperature emitted by tempmon #12

Closed
falkben opened this issue Aug 5, 2021 · 1 comment · Fixed by #13
Closed

constant temperature emitted by tempmon #12

falkben opened this issue Aug 5, 2021 · 1 comment · Fixed by #13

Comments

@falkben
Copy link
Contributor

falkben commented Aug 5, 2021

The current temperature is evaluated at install time and inserted into the tempmon script instead of the command to get the current temperature, here: https://github.com/meuter/argon-one-case-ubuntu-20.04/blob/master/argon1.sh#L595

For instance, my script, as installed, looks like:

cat /usr/bin/argonone-tempmon
#! /usr/bin/env bash

while true; do
    date
    echo "47°C"
    sleep 1
    # Go back up two lines.
    echo -ne "\033[2A"
done

instead of what it should be which is

cat /usr/bin/argonone-tempmon
#! /usr/bin/env bash

while true; do
    date
    echo "$(( $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ))°C"
    sleep 1
    # Go back up two lines.
    echo -ne "\033[2A"
done
@dcomer
Copy link

dcomer commented Oct 1, 2021

Seems to me the following should be sufficient for a system script. The reason being is that this script, presumably, would be called in a cron job for logging, and not for the continuous monitor at the console. For continuous monitoring, a second script could be used as you suggested. In either case, I appreciate the work that has been done thus far. Very cool. I use the below (in conjunction with a Python script) to log temperature every hour in a NAS server cluster to tune the NAS temperatures to avoid drive burnout.

#! /usr/bin/env bash
echo "$(( $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ))°C"

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

Successfully merging a pull request may close this issue.

2 participants