Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

hddtemp again

2004-12-12
2012-12-12
  • Add this in class.lmsensors.inc.php before return array_values($results);

       // temp. sd?
        $sensors_hdd = explode("\n", execute_program("hddtemp", "/dev/sd?"));
        foreach($sensors_hdd as $line) {
          if (ereg("(.*):(.*):(.*)", $line, $data)) {
             $results[$i]['label'] = trim($data[2]);
             $results[$i]['value'] = trim($data[3]);
             $i++;
          }
        }

        // temp. hd?
        $sensors_hdd = explode("\n", execute_program("hddtemp", "/dev/hd?"));
        foreach($sensors_hdd as $line) {
          if (ereg("(.*):(.*):(.*)", $line, $data)) {
             $results[$i]['label'] = trim($data[2]);
             $results[$i]['value'] = trim($data[3]);
             $i++;
          }
        }