]> git.zerfleddert.de Git - upsgraph/commitdiff
add min/avg/max/cur in big graphs
authorMichael Gernoth <michael@gernoth.net>
Mon, 8 Feb 2010 12:41:22 +0000 (13:41 +0100)
committerMichael Gernoth <michael@gernoth.net>
Mon, 8 Feb 2010 12:41:22 +0000 (13:41 +0100)
upsgraph.pl

index 3d35c2a1059304bad881cfa1a5d7c01f070804da..9ed59ba5f5b81b9a0e646356d612477ddb075eca 100755 (executable)
@@ -240,6 +240,19 @@ while(1) {
                print HTML2 "<html><head><title>" . $vars->{$var}->{'name'} . "</title></head>";
                print HTML2 '<body bgcolor="#ffffff">';
 
+
+               push @graphdef, "VDEF:min=${var},MINIMUM";
+               push @graphdef, "GPRINT:min:Minimum\\: %.2lf";
+
+               push @graphdef, "VDEF:avg=${var},AVERAGE";
+               push @graphdef, "GPRINT:avg:Average\\: %.2lf";
+
+               push @graphdef, "VDEF:max=${var},MAXIMUM";
+               push @graphdef, "GPRINT:max:Maximum\\: %.2lf";
+
+               push @graphdef, "VDEF:cur=${var},LAST";
+               push @graphdef, "GPRINT:cur:Current\\: %.2lf";
+
                ($averages, $width, $height) =
                        RRDs::graph("${outdir}/${var}.long.png.new",
                        "-w", "1008", @graphdef);
Impressum, Datenschutz