[rrd-users] Re: How do I print totals
Clarence Hart
rti1clh at ismd.ups.com
Wed Jul 25 19:52:47 MEST 2001
Owen,
I tried the following line and it still returns NaN.
CDEF:totalP=PREV,PREV,0,IF,FromDEF,FromDEF,0,IF,1800,*,+
I'll probably use rrdfetch to get all of the values and add
them up in perl then try to print it out on the graph. I'll
have to open the same *.rrd file twice but it seems like the
simplest way to go.
Thanks!!!
FYI...
If anybody cares this is how I get a total of all datapoints.
----- start Snip Here -------
#### Added to print total of Pages Printed ####### 7/25/01 - CLH
my ($start,$step,$names,$data) = RRDs::fetch $foobar , "AVERAGE", "-s
$starttime", "-e $endtime";
foreach my $line (@$data) {
foreach my $val (@$line) {
$totalP += $val*1800;
}
}
##################################################
# Add the "COMMENT" line below to print variable totalP on your graph.
"COMMENT:Total Pages Printed: $totalP")
----- end Snip here -------
Clarence Hart
UPS
Office: 410-560-4182
Fax: 410-560-4329
chart at ups.com
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list