Help with "Total All Data Sources" CDEF

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
gwynnebaer
Posts: 35
Joined: Sat Apr 13, 2002 5:16 pm
Location: Santa Barbara, CA

Help with "Total All Data Sources" CDEF

Post by gwynnebaer »

Folks, I have the following graph:

Code: Select all

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="(OHNA05) Operations/sec." \
--rigid \
--base=1000 \
--height=500 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Ops per Second" \
DEF:a="/usr/local/www/data/cacti/rra/ohna05_ops_cifs.rrd":ohna05_ops_cifs:AVERAGE \
DEF:b="/usr/local/www/data/cacti/rra/ohna05_ops_nfs.rrd":ohna05_ops_nfs:AVERAGE \
CDEF:cdefe=a,b,+ \
AREA:b#CAF100:"NFS Ops" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefe#005199:"Total\n" \
AREA:a#AAABA1:"CIFS Ops" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" 
This prints a nice report:

Image

but I would like it to print the "Current:", "Avg.", "Max." data for the CDEF (the line that reads "Total" in the middle) as well. I can't seem to figure how to do it (hence, is it possible?).

Thanks!

-gwynnebaer
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Yes, this a quite possible. Simply add an: average, current, and max GPRINT like you normal do. This time don't select a data source, and select the "Total All Data Sources" CDEF for each item.

Tell me how it works out.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests