From 142fb256e01b7f8b1f956225a47b96dfdfe4ed4b Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 2 Aug 2008 11:35:32 +0200 Subject: [PATCH] Make the cpufreq legend nicer --- config/cfgroot/graphs.pl | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 9ecc249a78..b305dd59a4 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -200,24 +200,22 @@ sub updatecpufreqgraph { if ( -e "$rrdlog/collectd/localhost/cpufreq/cpufreq-1.rrd" ){ push(@command,"CDEF:cpu1=cpu1_,1000000,/"); } - push(@command,"CDEF:cpu0=cpu0_,1000000,/"); - - if ( -e "$rrdlog/collectd/localhost/cpufreq/cpufreq-1.rrd" ){ - push(@command,"LINE1:cpu1".$color{"color11"}."A0:cpu 1\\j", + push(@command,"CDEF:cpu0=cpu0_,1000000,/", + "COMMENT:CPU", "COMMENT:$Lang::tr{'maximal'}", "COMMENT:$Lang::tr{'average'}", "COMMENT:$Lang::tr{'minimal'}", - "COMMENT:$Lang::tr{'current'}\\j", + "COMMENT:$Lang::tr{'current'}\\j",); + + + if ( -e "$rrdlog/collectd/localhost/cpufreq/cpufreq-1.rrd" ){ + push(@command,"LINE1:cpu1".$color{"color11"}."A0:1", "GPRINT:cpu1:MAX:%3.0lf Mhz", "GPRINT:cpu1:AVERAGE:%3.0lf Mhz", "GPRINT:cpu1:MIN:%3.0lf Mhz", "GPRINT:cpu1:LAST:%3.0lf Mhz\\j",); } - push(@command,"LINE2:cpu0".$color{"color12"}."A1:cpu 0\\j", - "COMMENT:$Lang::tr{'maximal'}", - "COMMENT:$Lang::tr{'average'}", - "COMMENT:$Lang::tr{'minimal'}", - "COMMENT:$Lang::tr{'current'}\\j", + push(@command,"LINE2:cpu0".$color{"color12"}."A1:0", "GPRINT:cpu0:MAX:%3.0lf Mhz", "GPRINT:cpu0:AVERAGE:%3.0lf Mhz", "GPRINT:cpu0:MIN:%3.0lf Mhz", -- 2.39.5