diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index 41ebf87457..eb72345052 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -6,6 +6,8 @@ $cemp = mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_ $cmp = mysql_result(mysql_query("select count(*) from cmpMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0); $cpm = mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0); $hrprocessor = mysql_result(mysql_query("select count(*) from hrDevice WHERE device_id = '" . $device['device_id'] . "' AND `hrDeviceType` = 'hrDeviceProcessor'"), 0); +$fans = mysql_result(mysql_query("select count(*) from fanspeed WHERE fan_host = '" . $device['device_id'] . "'"), 0); +$volts = mysql_result(mysql_query("select count(*) from voltage WHERE volt_host = '" . $device['device_id'] . "'"), 0); if ($temp) { $datas[] = 'temp'; } @@ -14,6 +16,8 @@ if ($cemp) { $datas[] = 'cemp'; } if ($cpm) { $datas[] = 'cpm'; } if ($cmp) { $datas[] = 'cmp'; } if ($hrprocessor) { $datas[] = 'hrprocessors'; } +if ($fans) { $datas[] = 'fanspeeds'; } +if ($volts) { $datas[] = 'voltages'; } $type_text['temp'] = "Temperatures"; $type_text['cmp'] = "Memory Pools"; @@ -21,6 +25,8 @@ $type_text['cemp'] = "Memory Enh Pools"; $type_text['cpm'] = "Processor Usage"; $type_text['storage'] = "Disk Usage"; $type_text['hrprocessors'] = "Processor Usage"; +$type_text['voltages'] = "Voltages"; +$type_text['fanspeeds'] = "Fanspeeds"; print_optionbar_start(); diff --git a/html/pages/device/health/fanspeeds.inc.php b/html/pages/device/health/fanspeeds.inc.php new file mode 100644 index 0000000000..7ba2104fe0 --- /dev/null +++ b/html/pages/device/health/fanspeeds.inc.php @@ -0,0 +1,59 @@ +"); + +$row = 1; + +while($fan = mysql_fetch_array($query)) { + + if(!is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + echo(" + " . $fan['fan_descr'] . " + " . $fan['fan_current'] . " rpm + " . $fan['fan_limit'] . " rpm + " . $fan['fan_notes'] . " + \n"); + echo(""); + + $graph_type = "fanspeed"; + +// start fanspeed graphs + + $daily_fan = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$day&to=$now&width=211&height=100"; + $daily_url = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$day&to=$now&width=400&height=150"; + + $weekly_fan = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$week&to=$now&width=211&height=100"; + $weekly_url = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$week&to=$now&width=400&height=150"; + + $monthly_fan = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$month&to=$now&width=211&height=100"; + $monthly_url = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$month&to=$now&width=400&height=150"; + + $yearly_fan = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$year&to=$now&width=211&height=100"; + $yearly_url = "graph.php?id=" . $fan['fan_id'] . "&type=$graph_type&from=$year&to=$now&width=400&height=150"; + + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + + + echo(""); + + + $row++; + +} + +echo(""); + + +?> + diff --git a/html/pages/device/health/voltages.inc.php b/html/pages/device/health/voltages.inc.php new file mode 100644 index 0000000000..db13d3390a --- /dev/null +++ b/html/pages/device/health/voltages.inc.php @@ -0,0 +1,59 @@ +"); + +$row = 1; + +while($volt = mysql_fetch_array($query)) { + + if(!is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + echo(" + " . $volt['volt_descr'] . " + " . $volt['volt_current'] . "V + " . $volt['volt_limit_low'] . 'V - ' . $volt['volt_limit'] . "V + " . $volt['volt_notes'] . " + \n"); + echo(""); + + $graph_type = "voltage"; + +// start voltage graphs + + $daily_volt = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$day&to=$now&width=211&height=100"; + $daily_url = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$day&to=$now&width=400&height=150"; + + $weekly_volt = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$week&to=$now&width=211&height=100"; + $weekly_url = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$week&to=$now&width=400&height=150"; + + $monthly_volt = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$month&to=$now&width=211&height=100"; + $monthly_url = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$month&to=$now&width=400&height=150"; + + $yearly_volt = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$year&to=$now&width=211&height=100"; + $yearly_url = "graph.php?id=" . $volt['volt_id'] . "&type=$graph_type&from=$year&to=$now&width=400&height=150"; + + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + + + echo(""); + + + $row++; + +} + +echo(""); + + +?> +