Friday, September 12, 2008

fun with linux: a script to get system temperature

Nowadays my laptop tends to overheat. Until I get a cooler. I need to know when to slow down, so I need to get system temperature. On linux one way is to type the following in terminal, just replace the [thermal_zone], with what is under /proc/acpi/thermal_zone.
cat /proc/acpi/thermal_zone/[thermal_zone]/temperature
It turn out I got 2 thermal zone, so sometime i have to type the command twice, for 2 of my thermal zone TSZ0 and TSZ1. Which can tedious, so I just add the command above to a shell script. I mean, type cat and the file is tedious, so i shorten it by put it in a shell script

1 comment:

  1. what about using cpufreq?

    it works very well for me. :)

    ReplyDelete