"); #if(file_exists("includes/dev-data-" . strtolower($device[os]) . ".inc.php")) { echo("
"); # echo("

Device Data

"); # include("includes/dev-data-" . strtolower($device[os]) . ".inc.php"); include("includes/dev-overview-data.inc.php"); echo("
"); #} if(mysql_result(mysql_query("SELECT count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"),0)) { echo("
"); echo("

Processors

"); echo(""); $i = '1'; $procs = mysql_query("SELECT * FROM `cpmCPU` WHERE device_id = '" . $device['device_id'] . "'"); while($proc = mysql_fetch_array($procs)) { if($proc['cpuCPMTotal5minRev'] > '60') { $proc_colour='#cc0000'; } else { $proc_colour='#0000cc'; } echo(""); $i++; } echo("
" . $proc['entPhysicalDescr'] . " " . $proc['cpmCPUTotal5minRev'] . "%
"); echo("
"); } if(mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE host_id = '" . $device['device_id'] . "'"),0)) { echo("
"); echo("

Storage

"); echo(""); $i = '1'; echo(""); $drives = mysql_query("SELECT * FROM `storage` WHERE host_id = '" . $device['device_id'] . "'"); while($drive = mysql_fetch_array($drives)) { $total = $drive['hrStorageSize'] * $drive['hrStorageAllocationUnits']; $used = $drive['hrStorageUsed'] * $drive['hrStorageAllocationUnits']; $drive['perc'] = round($drive['storage_perc'], 0); $total = formatStorage($total); $used = formatStorage($used); $fs_url = "?page=device&id=".$device['device_id']."§ion=dev-storage"; $fs_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$drive['hrStorageDescr']; $fs_popup .= "
"; $fs_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; if($perc > '80') { $drv_colour='#cc0000'; } else { $drvclass='#0000cc'; } echo(""); $i++; } echo("
MountpointUsageTotal Used
" . $drive['hrStorageDescr'] . " " . $drive['perc'] . "% " . $total . " " . $used . "
"); echo("
"); } unset($temp_seperator); if(mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"),0)) { $total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"),0); $rows = round($total / 2,0); echo("
"); echo("

Temperatures

"); $i = '1'; $temps = mysql_query("SELECT * FROM temperature WHERE temp_host = '" . $device['device_id'] . "'"); echo(""); echo(""); echo("
"); echo(""); while($temp = mysql_fetch_array($temps)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $temp_perc = $temp['temp_current'] / $temp['temp_limit'] * 100; $temp_colour = percent_colour($temp_perc); $temp_url = "graph.php?id=" . $temp['temp_id'] . "&type=temp&from=$month&to=$now&width=400&height=125"; $temp_link = ""; $temp_link .= $temp['temp_descr'] . ""; $temp['temp_descr'] = truncate($temp['temp_descr'], 25, ''); echo(""); if($i == $rows) { echo("
$temp_link" . $temp['temp_current'] . "°C
"); } $i++; } echo("
"); echo("
"); echo("
"); } echo("
"); echo("

Recent Events

"); $query = "SELECT *,DATE_FORMAT(datetime, '%d/%b/%y %T') as humandate FROM `eventlog` WHERE `host` = '$_GET[id]' ORDER BY `datetime` DESC LIMIT 0,10"; $data = mysql_query($query); echo(""); while($entry = mysql_fetch_array($data)) { include("includes/print-event-short.inc"); } echo("
"); echo(""); if($interfaces['total']) { echo("

Total Traffic

" . device_traffic_image($device['device_id'], 490, 100, $day, '-300s') . "
"); } if($interfaces['total']) { echo("
"); echo("

Interfaces

"); echo("
$interfaces[total] $interfaces[up] $interfaces[down] $interfaces[disabled]
"); echo("
"); $sql = "SELECT * FROM interfaces WHERE `device_id` = '" . $device['device_id'] . "'"; $query = mysql_query($sql); while($data = mysql_fetch_array($query)) { $data['hostname'] = $device['hostname']; echo("$ifsep" . generateiflink($data, makeshortif(strtolower($data['ifDescr'])))); $ifsep = ", "; } unset($ifsep); echo("
"); echo("
"); } if($services['total']) { echo("
"); echo("

Services

"); echo("
$services[total] $services[up] $services[down] $services[disabled]
"); echo("
"); $sql = "SELECT * FROM services WHERE service_host = '" . $device['device_id'] . "' ORDER BY service_type"; $query = mysql_query($sql); while($data = mysql_fetch_array($query)) { if ($data[service_status] == "0" && $data[service_ignore] == "1") { $status = "grey"; } if ($data[service_status] == "1" && $data[service_ignore] == "1") { $status = "green"; } if ($data[service_status] == "0" && $data[service_ignore] == "0") { $status = "red"; } if ($data[service_status] == "1" && $data[service_ignore] == "0") { $status = "blue"; } echo("$break" . strtolower($data[service_type]) . ""); $break = ", "; } echo("
"); } echo(""); ?>