[rrd-users] Adjust value in GPRINT statement

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Thu Apr 10 19:40:18 CEST 2014

> As you can see, the reset count is '1' at the
> beginning of the graph and changes to '2' but the value that is actually
> used to graph the yellow line is 11.1 for the higher portion as printed
> by my GPRINT statement. I'd like to apply my scaling factors in reverse
> for the GPRINT so that it displays "Reset Count   2" instead of "Reset
> Count   11.1" but I can't figure out if/how to apply the math within the
> GPRINT or how to use GPRINT to print a script variable instead of a CF.

Somewhere in your rrdtool command script you have that 1 or 2.  You change 
it to 11.1 using a CDEF.
Your GPRINT statement is printing the CDEF variable. Change that so that it 
prints the DEF variable.
Or, if needed, create another CDEF which sole purpose is to provide the 
correct values to print.

More information about the rrd-users mailing list