I had system freezes with my HP Pavilion when using Linux (at the moment I use Debian, Ubuntu showed the same behavior). HP support forum suggests that the error is related to temperature control. So I would like to log the temperature output with aspi -t while waiting for the next freeze.

My first try was:

$ acpi -t > temperaturelog.txt
$ watch -n 1 acpi -t >> temperaturelog.txt

However, this leads to only two lines, the second command leads to a cryptic second line. It might be because I used Ctrl+C to end the logging. What did I do wrong? How would you improve this?


Here's one way to log temperatures every second:

$ while true; do echo `date` '->' `acpi -t`>> temperaturelog.txt;sleep 1;done

You'll have to kill or Ctrl-C to stop it.


Since I have the same problem, I wrote a really simple and small python script which logs the temperature to a file.
I also wrote a little script which can plot the temperature data and possible system shutdowns to a graph.

You can get the two python scripts here: https://github.com/tymm/temp-log

I hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.