Bash Script to Get Processor Temperatures Using ACPI in Linux

Last modified: 
Friday, March 27th, 2015
# Automatically locates and lists the temperatures
# for all CPUs monitored by ACPI.
function gettemp() {
    Processors=`ls -1 /proc/acpi/thermal_zone/`
    for Proc in $Processors
        Temp=`cat /proc/acpi/thermal_zone/$Proc/temperature`
        echo '    '$Proc $Temp

The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.