From: Michael Gernoth Date: Mon, 8 Feb 2010 12:41:22 +0000 (+0100) Subject: add min/avg/max/cur in big graphs X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/upsgraph/commitdiff_plain/58c56c832af936147946c4b2e30eb3e1f90ee51d?ds=sidebyside add min/avg/max/cur in big graphs --- diff --git a/upsgraph.pl b/upsgraph.pl index 3d35c2a..9ed59ba 100755 --- a/upsgraph.pl +++ b/upsgraph.pl @@ -240,6 +240,19 @@ while(1) { print HTML2 "" . $vars->{$var}->{'name'} . ""; print HTML2 ''; + + 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);