]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Removed ACPI-Cooling device graph because always 0 collected
authorArne Fitzennreiter <arne_f@ipfire.org>
Wed, 22 Oct 2008 05:39:54 +0000 (07:39 +0200)
committerArne Fitzennreiter <arne_f@ipfire.org>
Wed, 22 Oct 2008 05:39:54 +0000 (07:39 +0200)
Disabled collecting of ACPI-Cooling device data
Change linewith of ACPI Temp graph

config/cfgroot/graphs.pl
config/collectd/collectd.conf
html/cgi-bin/hardwaregraphs.cgi

index 668e8934a22bb1d4b83b4797282a368cdeafe15c..ff0706b4df01803c58ac810b665552ffd552bcef 100644 (file)
@@ -1057,7 +1057,7 @@ sub updatethermaltempgraph {
                "-h 125",
                "-l 0",
                "-r",
-               "-t "."ACPI Thermal-Zone Temperature"." ".$Lang::tr{$period},
+               "-t "."ACPI Thermal-Zone Temperature"." ".$Lang::tr{$period},
                "-v Grad Celsius",
                "--color=SHADEA".$color{"color19"},
                "--color=SHADEB".$color{"color19"},
@@ -1073,7 +1073,7 @@ sub updatethermaltempgraph {
                my $j=$i+1;
                push(@command,"DEF:temp".$i."_=".$mainsettings{'RRDLOG'}."/collectd/localhost/thermal-thermal_zone".$i."/temperature-temperature.rrd:value:AVERAGE"
                                ,"CDEF:temp".$i."=temp".$i."_,1,/"
-                               ,"LINE1:temp".$i.$color{"color1$j"}."A0:Temp ".$i." "
+                               ,"LINE2:temp".$i.$color{"color1$j"}."A0:Temp ".$i." "
                                ,"GPRINT:temp".$i.":MAX:%3.0lf Grad C"
                                ,"GPRINT:temp".$i.":AVERAGE:%3.0lf Grad C"
                                ,"GPRINT:temp".$i.":MIN:%3.0lf Grad C"
@@ -1085,50 +1085,6 @@ sub updatethermaltempgraph {
        print "Error in RRD::graph for thermal temp: ".$ERROR."\n" if $ERROR;
 }
 
-sub updatethermalcoolinggraph {
-       my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-cooling_device* | wc -l`;
-       my $period    = $_[0];
-       my @command = (
-               "-",
-               "--start",
-               "-1".$period,
-               "-aPNG",
-               "-i",
-               "-z",
-               "-W www.ipfire.org",
-               "--alt-y-grid",
-               "-w 600",
-               "-h 125",
-               "-l 0",
-               "-r",
-               "-t "."ACPI Thermal-Zone Cooling Device"." ".$Lang::tr{$period},
-               "-v State",
-               "--color=SHADEA".$color{"color19"},
-               "--color=SHADEB".$color{"color19"},
-               "--color=BACK".$color{"color21"},
-               "COMMENT:".sprintf("%-15s",$Lang::tr{'caption'}),
-               "COMMENT:".sprintf("%15s",$Lang::tr{'maximal'}),
-               "COMMENT:".sprintf("%15s",$Lang::tr{'average'}),
-               "COMMENT:".sprintf("%15s",$Lang::tr{'minimal'}),
-               "COMMENT:".sprintf("%15s",$Lang::tr{'current'})."\\j"
-       );
-
-       for(my $i = 0; $i < $thermalcount; $i++) {
-               my $j=$i+1;
-               push(@command,"DEF:cooling".$i."_=".$mainsettings{'RRDLOG'}."/collectd/localhost/thermal-cooling_device".$i."/gauge-cooling_state.rrd:value:AVERAGE"
-                               ,"CDEF:cooling".$i."=cooling".$i."_,1,/"
-                               ,"LINE1:cooling".$i.$color{"color1$j"}."A0:cooling ".$i." "
-                               ,"GPRINT:cooling".$i.":MAX:%3.0lf"
-                               ,"GPRINT:cooling".$i.":AVERAGE:%3.0lf"
-                               ,"GPRINT:cooling".$i.":MIN:%3.0lf"
-                               ,"GPRINT:cooling".$i.":LAST:%3.0lf\\j");
-       }
-
-       RRDs::graph (@command);
-       $ERROR = RRDs::error;
-       print "Error in RRD::graph for thermal cooling: ".$ERROR."\n" if $ERROR;
-}
-
 
 # Generate a random color, used by Qos Graph to be independent from the amount of values
 
index 546c3194abb59c203264de8692d9dfca1b211989..2ac99f6a669c4bb439ec9dbbee853a6ace3f5af3 100644 (file)
@@ -81,3 +81,15 @@ LoadPlugin syslog
 <Plugin syslog>
        LogLevel info
 </Plugin>
+
+<Plugin thermal>
+       Device "cooling_device0"
+       Device "cooling_device1"
+       Device "cooling_device2"
+       Device "cooling_device3"
+       Device "cooling_device4"
+       Device "cooling_device5"
+       Device "cooling_device6"
+       Device "cooling_device7"
+       IgnoreSelected true
+</Plugin>
index 66510d0584560b118b05f23cb534790334f8f99d..c4e54f9d232c065c4cf0f50fa98fba7794871729 100644 (file)
@@ -67,10 +67,6 @@ if ( $querry[0] =~ "hwtemp"){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
        &Graphs::updatethermaltempgraph($querry[1]);
-}elsif ( $querry[0] =~ "thermalcooling"){
-       print "Content-type: image/png\n\n";
-       binmode(STDOUT);
-       &Graphs::updatethermalcoolinggraph($querry[1]);
 }elsif ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" ){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
@@ -111,12 +107,6 @@ if ( $querry[0] =~ "hwtemp"){
            &Header::closebox();
        }
 
-       if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone*` ) {
-           &Header::openbox('100%', 'center', "ACPI Thermal-Zone Cooling $Lang::tr{'graph'}");
-           &Graphs::makegraphbox("hardwaregraphs.cgi","thermalcooling","day");
-           &Header::closebox();
-       }
-
        if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*` ) {
            &Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
            &Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day");