From 522783ba9afebcd82869c57090feb8258e52915b Mon Sep 17 00:00:00 2001 From: ndarshan Date: Fri, 14 Mar 2014 15:07:03 +0530 Subject: Template: Fixed the issues in physical graph templates Fixed issue with memory template, other templates to have graphs of same size for rendering in ui. Change-Id: Iacfe7e16b16e6a6cccb104dea9fed412b3f533c3 Signed-off-by: ndarshan Reviewed-on: https://cuckoo.blr.redhat.com:8443/11 Reviewed-by: Sahina Bose --- templates/check_memory.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'templates/check_memory.php') diff --git a/templates/check_memory.php b/templates/check_memory.php index d620b66..c06ffc5 100644 --- a/templates/check_memory.php +++ b/templates/check_memory.php @@ -18,7 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # $def[1]=""; $opt[1]=""; $ds_name[1]=""; -$upper_limit = round($MAX[1] / (1048576),2) +$upper_limit = round($MAX[1] / (1048576),2); $opt[1] = "--vertical-label \"$UNIT[1](Total:$upper_limit GB)\" -l 0 -u $upper_limit -r --title \"Memory usage for $hostname / $servicedesc\" --slope-mode -N"; $ds_name[1] = "Memory Usage"; @@ -31,21 +31,21 @@ $def[1] .= "DEF:cached_mem_in=$RRDFILE[1]:$DS[4]:AVERAGE " ; $def[1] .= rrd::cdef("used_mem_out","used_mem_in,1048576,/"); $def[1] .= "LINE1:used_mem_out#0000ff:\"Used \" "; -$def[1] .= "GPRINT:used_mem_in:LAST:\"%8.2lf GB LAST \" "; -$def[1] .= "GPRINT:used_mem_in:MAX:\"%8.2lf GB MAX \" "; -$def[1] .= "GPRINT:used_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; +$def[1] .= "GPRINT:used_mem_out:LAST:\"%8.2lf GB LAST \" "; +$def[1] .= "GPRINT:used_mem_out:MAX:\"%8.2lf GB MAX \" "; +$def[1] .= "GPRINT:used_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; $def[1] .= rrd::cdef("buffer_mem_out","buffer_mem_in,1048576,/"); $def[1] .= "LINE1:buffer_mem_out#800080:\"Buffer \" "; -$def[1] .= "GPRINT:buffer_mem_in:LAST:\"%8.2lf GB LAST \" "; -$def[1] .= "GPRINT:buffer_mem_in:MAX:\"%8.2lf GB MAX \" "; -$def[1] .= "GPRINT:buffer_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; +$def[1] .= "GPRINT:buffer_mem_out:LAST:\"%8.2lf GB LAST \" "; +$def[1] .= "GPRINT:buffer_mem_out:MAX:\"%8.2lf GB MAX \" "; +$def[1] .= "GPRINT:buffer_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; $def[1] .= rrd::cdef("cached_mem_out","cached_mem_in,1048576,/"); $def[1] .= "LINE1:cached_mem_out#008000:\"Cached \" "; -$def[1] .= "GPRINT:cached_mem_in:LAST:\"%8.2lf GB LAST \" "; -$def[1] .= "GPRINT:cached_mem_in:MAX:\"%8.2lf GB MAX \" "; -$def[1] .= "GPRINT:cached_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; +$def[1] .= "GPRINT:cached_mem_out:LAST:\"%8.2lf GB LAST \" "; +$def[1] .= "GPRINT:cached_mem_out:MAX:\"%8.2lf GB MAX \" "; +$def[1] .= "GPRINT:cached_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" '; if ($WARN[1] != ""){ $WAR = $WARN[1] / 1048576 ; -- cgit