[rrd-users] Re: Trying to format legend using GPRINT

Simon Hobson linux at thehobsons.co.uk
Mon Jul 17 17:11:17 MEST 2006

Nataniel Klug wrote:

>    I am starting to use RRD and I am getting a serius difficult in
>making my legend goes pretty in screen...
>    I wanna that my GPRINT legend goes into the same colum so I make this
>script (I am using rrdcgi):
>                <RRD::GRAPH backbone_trafego_diario.png
>                        --title="consumo de banda backbone (diario)"
>                        --vertical-label="bps"
>                        --width=600
>                        --height=200
>                        --units-exponent=3
>                        --font DEFAULT:8:
>                        "CDEF:backbone_in_bps=backbone_in,8,*"
>                        AREA:backbone_in_bps#54EC48:"download"
>                        LINE1:backbone_in_bps#24BC14:
>                        'GPRINT:backbone_in_bps:MAX:max\:   %4.2lf%sbps'
>                        'GPRINT:backbone_in_bps:AVERAGE:med\: %4.2lf%sbps'
>                        'GPRINT:backbone_in_bps:LAST:atu\:  %4.2lf%sbps\n'
>                        "CDEF:backbone_out_bps=backbone_out,8,*"
>                        LINE1:backbone_out_bps#1598C3:"upload  "
>                        'GPRINT:backbone_out_bps:MAX:max\: %4.2lf%sbps'
>                        'GPRINT:backbone_out_bps:AVERAGE:med\: %4.2lf%sbps'
>                        'GPRINT:backbone_out_bps:LAST:atu\:  %4.2lf%sbps'
>                >
>    For now this is working fine BUT I have a legend that is Mega and all
>others are kilo... When this "Mega" legend comes to kilo the legend will
>be all wrong formating. You can see the graph in this adress:

I see that everything is lined up in your daily (diario) graph, and 
your code looks OK. I have graphs using :

   COMMENT:"In  "
   GPRINT:vglobinavg:"%6.2lf %sBps"
   GPRINT:vglobinmax:"%6.2lf %sBps\n"

   COMMENT:"Out "
   GPRINT:vgloboutavg:"%6.2lf %sBps"
   GPRINT:vgloboutmax:"%6.2lf %sBps"  

where the columns line up.

>    If anyone can tell me where to find info about how-to format legends
>so they stay cool I would love to read...

Try http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html


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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list