[rrd-users] Formating legend problem
Valentinos Charalambous
v4lentinos at hotmail.com
Tue Jan 30 15:31:56 CET 2007
Right now im using the following code:
"DEF:$top[0]=$filename:$top[0]:AVERAGE","DEF:$top[1]=$filename:$top[1]:AVERAGE",
"DEF:$top[2]=$filename:$top[2]:AVERAGE",
"AREA:$top[0]#000000::$top[0] ", "STACK:$top[1]#00FF00:$top[1]
",
"STACK:$top[2]#FF00FF:$top[2] ",
"COMMENT: MAX MIN AVERAGE
CURRENT\\l",
"GPRINT:$top[0]:MAX:$top[1] %15.0lf ", "GPRINT:$top[0]:MIN: %10.0lf ",
"GPRINT:$top[0]:AVERAGE: %7.0lf ", "GPRINT:$top[0]:LAST:
%11.0lf\\l",
"GPRINT:$top[1]:MAX:$top[2] %13.0lf ", "GPRINT:$top[1]:MIN: %10.0lf ",
"GPRINT:$top[1]:AVERAGE: %7.0lf ", "GPRINT:$top[1]:LAST:
%11.0lf\\l",
"GPRINT:$top[2]:MAX:$top[3] %10.0lf ", "GPRINT:$top[2]:MIN: %10.0lf ",
"GPRINT:$top[2]:AVERAGE: %5.0lf ", "GPRINT:$top[2]:LAST:
%8.0lf\\l"
Can i make any changes to the above and fix the problem or i should change
it completely?
thanx
>From: Alex van den Bogaerdt <alex at ergens.op.het.net>
>To: rrd-users at lists.oetiker.ch
>Subject: Re: [rrd-users] Formating legend problem
>Date: Tue, 30 Jan 2007 12:35:20 +0100
>
>On Tue, Jan 30, 2007 at 11:08:15AM +0000, Valentinos Charalambous wrote:
>
> > variables can be:
> > a
> > ab
> > abc
> > abcd
> > ..
> > abcdefghij
>
>do not use "%s", use "%10s" or "%-10s" to print these names.
>
>"a "
>"ab "
>"abc "
>"abcd "
> ..
>"abcdefghij"
>
>This is something you need to do in your front end, not in rrdtool itself.
>RRDtool would already see those spaces in its legend:
>
>"LINE1:a#FF0000:a :STACK"
>"LINE1:ab#FF0000:ab :STACK"
>"LINE1:abc#FF0000:abc :STACK"
>
>Next run:
>
>"LINE1:ab#FF0000:ab :STACK"
>"LINE1:abc#FF0000:abc :STACK"
>"LINE1:a#FF0000:a :STACK"
>
>In other words, the printf command generating your grapher script could be:
>
>printf(" LINE%i:%s#%s:%-10s:STACK",linewidth,vname,color,vname);
>
>
>HTH
>--
>Alex van den Bogaerdt
>http://www.vandenbogaerdt.nl/rrdtool/
>
>_______________________________________________
>rrd-users mailing list
>rrd-users at lists.oetiker.ch
>https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
_________________________________________________________________
Find Love This New Year With match.com! http://msnuk.match.com
More information about the rrd-users
mailing list