From 58c56c832af936147946c4b2e30eb3e1f90ee51d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Mon, 8 Feb 2010 13:41:22 +0100 Subject: [PATCH] add min/avg/max/cur in big graphs --- upsgraph.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- 2.39.2