Tuesday, July 24, 2012

Detecting CPU Temperature on Debian Linux

To read the temperature of the CPU, the package called "lm-sensors" should be installed.

Then, in Terminal, I issued the command:
sensors|grep temp|awk '{print $2}'

Sample output:
+35.0°C



or

sensors|grep temp|awk '{print $2}'|cut -b2,3,4,5

Sample output:
35.0

Reference:

See the discussion on this page.

No comments: