From: Arne Fitzenreiter Date: Sat, 2 Aug 2008 09:35:32 +0000 (+0200) Subject: Make the cpufreq legend nicer X-Git-Tag: v2.3-beta3~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=142fb256e01b7f8b1f956225a47b96dfdfe4ed4b;p=ipfire-2.x.git Make the cpufreq legend nicer --- 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",