From: Arne Fitzenreiter Date: Sat, 4 Oct 2008 13:20:30 +0000 (+0200) Subject: Fix cpu frequency graph X-Git-Tag: v2.3-beta4~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5dcc7ad75483fec9889d05213da1eaf355f9f0ad;p=ipfire-2.x.git Fix cpu frequency graph --- diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 9e7f79f4ce..dadbf80f19 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -1010,7 +1010,6 @@ sub updatecpufreqgraph { "-w 600", "-h 125", "-l 0", - "-u 100", "-r", "-t ".$Lang::tr{'cpu frequency per'}." ".$Lang::tr{$period}, "-v MHz", @@ -1025,9 +1024,10 @@ sub updatecpufreqgraph { ); for(my $i = 0; $i < $cpucount; $i++) { + my $j=$i+1; push(@command,"DEF:cpu".$i."_=".$mainsettings{'RRDLOG'}."/collectd/localhost/cpufreq/cpufreq-".$i.".rrd:value:AVERAGE" ,"CDEF:cpu".$i."=cpu".$i."_,1000000,/" - ,"LINE3:cpu".$i.$color{"color12"}."A0:1" + ,"LINE1:cpu".$i.$color{"color1$j"}."A0:cpu ".$i." " ,"GPRINT:cpu".$i.":MAX:%3.0lf Mhz" ,"GPRINT:cpu".$i.":AVERAGE:%3.0lf Mhz" ,"GPRINT:cpu".$i.":MIN:%3.0lf Mhz" diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/netinternal.cgi b/html/cgi-bin/netinternal.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/netother.cgi b/html/cgi-bin/netother.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi index 3343ad57ff..1ec07d057c 100644 --- a/html/cgi-bin/system.cgi +++ b/html/cgi-bin/system.cgi @@ -39,14 +39,14 @@ my @querry = split(/\?/,$ENV{'QUERY_STRING'}); $querry[0] = '' unless defined $querry[0]; $querry[1] = 'hour' unless defined $querry[1]; -if ( $querry[0] =~ "cpu"){ +if ( $querry[0] =~ "cpufreq"){ print "Content-type: image/png\n\n"; binmode(STDOUT); - &Graphs::updatecpugraph($querry[1]); -}elsif ( $querry[0] =~ "cpufreq"){ + &Graphs::updatecpufreqgraph($querry[1]); +}elsif ( $querry[0] =~ "cpu"){ print "Content-type: image/png\n\n"; binmode(STDOUT); - &Graphs::updatecpufreqgraph($querry[1]); + &Graphs::updatecpugraph($querry[1]); }elsif ( $querry[0] =~ "load"){ print "Content-type: image/png\n\n"; binmode(STDOUT); @@ -58,7 +58,7 @@ if ( $querry[0] =~ "cpu"){ if ( -e "$mainsettings{'RRDLOG'}/collectd/localhost/cpufreq/cpufreq-0.rrd"){ &Header::openbox('100%', 'center', "CPU $Lang::tr{'graph'}"); - &Graphs::makegraphbox("system.cgi","cpu","day","325"); + &Graphs::makegraphbox("system.cgi","cpufreq","day","325"); &Header::closebox(); }