Index: configure
===================================================================
--- configure	(revision 9717)
+++ configure	(working copy)
@@ -1792,6 +1792,19 @@
   fi
 fi
 
+#########################################
+# lmsensor probe
+
+cat > $TMPC << EOF
+#include <sensors/sensors.h>
+int main( void ) { return; };
+EOF
+
+lmsensors=no
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lsensors > /dev/null 2>&1; then
+  lmsensors=yes
+fi
+
 ##########################################
 # SDL probe
 
@@ -2442,6 +2455,10 @@
   echo "FREETYPE_CFLAGS=`freetype-config --cflags`" >> $MYTH_CONFIG_MAK
   echo "FREETYPE_LIBS=`freetype-config --libs`" >> $MYTH_CONFIG_MAK
 fi
+if test "$lmsensors" = "yes" ; then
+  CCONFIG="$CCONFIG using_lmsensors"
+  echo "#define CONFIG_LMSENSORS 1" >> $TMPH
+fi
 if test "$sunmlib" = "yes" ; then
   echo "HAVE_MLIB=yes" >> $MYTH_CONFIG_MAK
   echo "#define HAVE_MLIB 1" >> $TMPH
Index: programs/mythbackend/mythbackend.pro
===================================================================
--- programs/mythbackend/mythbackend.pro	(revision 9717)
+++ programs/mythbackend/mythbackend.pro	(working copy)
@@ -24,3 +24,5 @@
 using_dvb:DEFINES += USING_DVB
 
 using_valgrind:DEFINES += USING_VALGRIND
+
+using_lmsensors:LIBS += -lsensors
Index: programs/mythbackend/mainserver.cpp
===================================================================
--- programs/mythbackend/mainserver.cpp	(revision 9717)
+++ programs/mythbackend/mainserver.cpp	(working copy)
@@ -45,6 +45,11 @@
 #include "jobqueue.h"
 #include "autoexpire.h"
 #include "previewgenerator.h"
+#ifdef CONFIG_LMSENSORS
+    #define LMSENSOR_DEFAULT_CONFIG_FILE "/etc/sensors.conf"
+    #include <sensors/sensors.h>
+    #include <sensors/chips.h>
+#endif
 
 /** Milliseconds to wait for an existing thread from
  *  process request thread pool.
@@ -3903,6 +3908,7 @@
     QDomElement mInfo   = pDoc->createElement("MachineInfo");
     QDomElement storage = pDoc->createElement("Storage"    );
     QDomElement load    = pDoc->createElement("Load"       );
+    QDomElement thermal = pDoc->createElement("Thermal"    );
     QDomElement guide   = pDoc->createElement("Guide"      );
 
     root.appendChild (mInfo  );
@@ -3984,6 +3990,77 @@
         load.setAttribute("avg3", rgdAverages[2]);
     }
 
+    //temperature -----------------
+    // Try ACPI first, then lmsensor 2nd
+    QDir dir("/proc/acpi/thermal_zone");
+    QString acpiTempDir;
+    if (dir.exists())
+    {
+        QStringList lst = dir.entryList();
+        QRegExp rxp = QRegExp ("TH?M?", TRUE, FALSE);
+        QString line, temp;
+        for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
+        {
+            if ( (*it).contains(rxp))
+            {
+                acpiTempDir = dir.absFilePath(*it);
+            }
+        }
+       
+        QFile acpiTempFile(acpiTempDir.append("/temperature"));
+        if (acpiTempFile.open(IO_ReadOnly))
+        {
+            QTextStream stream (&acpiTempFile);
+            line = stream.readLine();
+            rxp = QRegExp ("(\\d+)", TRUE, FALSE);
+            if (rxp.search(line) != -1 )
+            {
+                temp = rxp.cap(1);
+                temp += " &#8451;"; // print degress Celsius 
+                mInfo.appendChild(thermal);
+                thermal.setAttribute("temperature", temp);
+            }
+        }
+        acpiTempFile.close();
+    }
+#ifdef CONFIG_LMSENSORS
+    else 
+    {
+        int chip_nr, a, b;
+        char *label;
+        double value;
+        const sensors_chip_name *chip;
+        const sensors_feature_data *data;
+        const char* lmsensorConfigName = LMSENSOR_DEFAULT_CONFIG_FILE;
+        a = b = 0;
+        FILE *lmsensorConfigFile = fopen(lmsensorConfigName, "r");
+        sensors_init(lmsensorConfigFile);
+        fclose(lmsensorConfigFile);
+        free(lmsensorConfigFile);
+        for (chip_nr = 0 ; (chip = sensors_get_detected_chips(&chip_nr)) ; )
+        {
+            while ((data = sensors_get_all_features(*chip, &a, &b)))
+            {
+                if ((!sensors_get_label(*chip, data->number, &label)) && 
+                    (!sensors_get_feature(*chip, data->number, &value)))
+                {
+                    // Find label matching "CPU Temp" or "Temp/CPU" or something close to that
+                    QRegExp rxp = QRegExp ("(CPU.+Temp)|(Temp.+CPU)", FALSE, FALSE);
+                    if (rxp.search(QString(label)) != -1  && value > 0)
+                    {
+                        VERBOSE(VB_IMPORTANT,
+                                QString("Temp debug. Remove before committing: lmsensor temp label %1 value %2")
+                                .arg(label).arg(value));
+                        QString temp = QString("%1").arg(value);
+                        temp += " &#8451;";
+                        mInfo.appendChild(thermal);
+                        thermal.setAttribute("temperature", temp);
+                    }
+                }
+            }
+        }
+    }
+#endif
     // Guide Data ---------------------
 
     QDateTime GuideDataThrough;
Index: programs/mythbackend/httpstatus.cpp
===================================================================
--- programs/mythbackend/httpstatus.cpp	(revision 9717)
+++ programs/mythbackend/httpstatus.cpp	(working copy)
@@ -733,6 +733,24 @@
         }
     }
 
+   // ACPI temperature ------------------
+
+    node = info.namedItem( "Thermal" );
+
+    if (!node.isNull())
+    {
+        QDomElement e = node.toElement();
+
+        if (!e.isNull())
+        {
+            std::string temperature = e.attribute( "temperature" , "0" );
+
+            os << "      Current CPU temperature: "
+               << temperature
+               << ".<br />\r\n";
+        }
+    }
+	
     // Guide Info ---------------------
 
     node = info.namedItem( "Guide" );
