X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/upsgraph/blobdiff_plain/916b899905b553d1c4f12b9593ce0818633801b7..58c56c832af936147946c4b2e30eb3e1f90ee51d:/upsgraph.pl
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);