[rrd-users] GPRINT produces float value although input is int

Simon Hobson linux at thehobsons.co.uk
Tue May 20 12:55:35 CEST 2014


thanos1983 <goofy_thanos2001 at hotmail.com> wrote:

> ... when I use
> "GPRINT:".$in_min.": Minimum\:%6.2lf %S", I get a floating value: 195.20 for
> example, although that the value inserted is 195.

See http://www.vandenbogaerdt.nl/rrdtool/ and in particular the tutorial titled "Rates, normalizing and consolidating" to see why your integers get converted to decimals. Then, as other have pointed out, the n.m in your gprint statement control the number of significant digits and decimal places to be used - see the PRINT section on http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html



More information about the rrd-users mailing list