[rrd-users] GPRINT doing something weird

Oddie oddie at vtr.net
Mon Dec 17 15:58:37 MET 2001


Im doing a calculation with my data in the rrdtool graph step.
 

rrdtool graph xx.gif --start -86400 -t "My Router" -v "mb/s" -w 500 -h
100 
DEF:inoctets=router.rrd:input:AVERAGE 
CDEF:in=inoctets,8,* 
DEF:outoctets=router.rrd:output:AVERAGE 
CDEF:out=outoctets,8,* 
AREA:in#00FF00:"In"\\l 
LINE1:out#0000FF:"Out"\\l 
CDEF:var2=in,1000000,/ 
CDEF:var1=var2,0,250,LIMIT 
CDEF:var4=out,1000000,/ 
CDEF:var3=var4,0,250,LIMIT 

Then I print it with 

GPRINT:var1:LAST:"%35.1lf %s" 
GPRINT:var3:LAST:"%35.1lf %s"

And everything is fine, except when I get values less than 1 meg. The
problem is the way that the data is shown, for example, if a get 300KB
in a collection, the graph shows in the gprint section :  

"300 m" or "300 u"  instead of "0.3"

The graph is correct, I get the 0.3MB in the right position but i don't
get the 0.3MB when i print the data with the GPRINT

Any ideas  ?


--
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