// 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++;
}
} |