]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix cpu frequency graph
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 4 Oct 2008 13:20:30 +0000 (15:20 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 4 Oct 2008 13:20:30 +0000 (15:20 +0200)
config/cfgroot/graphs.pl
html/cgi-bin/netexternal.cgi [changed mode: 0755->0644]
html/cgi-bin/netinternal.cgi [changed mode: 0755->0644]
html/cgi-bin/netother.cgi [changed mode: 0755->0644]
html/cgi-bin/system.cgi

index 9e7f79f4ce6c732aca25b65a00080402300e02c0..dadbf80f19c184588f7dbf868a7b5b250c0a96b2 100644 (file)
@@ -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"
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 3343ad57ffecdef09aca4eae15599344616f2023..1ec07d057cfd2447fc55b68baf64883bd0be848e 100644 (file)
@@ -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();
        }