mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes to memory and CPU graphs on IOS. adding mixed colourscheme to static-config
git-svn-id: http://www.observium.org/svn/observer/trunk@523 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,14 +4,10 @@ $query = mysql_query("SELECT * FROM `cpmCPU` where `device_id` = '".mres($device
|
||||
|
||||
$i=0;
|
||||
while($proc = mysql_fetch_array($query)) {
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/$hostname/cpmCPU-" . $proc['cpmCPU_oid'] . ".rrd";
|
||||
|
||||
if(is_file($rrd_filename)) {
|
||||
|
||||
$descr = str_pad($proc['entPhysicalDescr'], 8);
|
||||
$descr = substr($descr,0,8);
|
||||
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $descr;
|
||||
$rrd_list[$i]['rra'] = "usage";
|
||||
@@ -42,5 +38,4 @@ if($rrd_list) {include ("generic_multi_line.inc.php"); } else {
|
||||
$rrd_options .= " GPRINT:5m_max:MAX:%6.2lf\ GPRINT:5m:AVERAGE:%6.2lf\\\\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@@ -34,7 +34,7 @@ if(mysql_result(mysql_query("SELECT COUNT(*) FROM `cempMemPool` WHERE `device_id
|
||||
$rrd_options .= " GPRINT:mempool" . $iter . "total:MAX:%3.0lf%%\\\\n";
|
||||
$iter++;
|
||||
}
|
||||
} else {
|
||||
} elseif (mysql_result(mysql_query("SELECT COUNT(*) FROM `cmpMemPool` WHERE `device_id` = '$device_id'"),0) > '0') {
|
||||
$iter = "1";
|
||||
$rrd_options .= " COMMENT:' Currently Used Max\\n'";
|
||||
$sql = mysql_query("SELECT * FROM `cmpMemPool` where `device_id` = '$device_id'");
|
||||
@@ -58,6 +58,8 @@ if(mysql_result(mysql_query("SELECT COUNT(*) FROM `cempMemPool` WHERE `device_id
|
||||
$rrd_options .= " GPRINT:mempool" . $iter . "total:MAX:%3.0lf%%\\\\n";
|
||||
$iter++;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user