[rrd-users] rrdtool graph confusion

Emily Chouinard cousin17 at msu.edu
Tue Jul 1 17:50:11 CEST 2008


Henrik Lindhe wrote:
> On Tue, Jul 1, 2008 at 17:23, Emily Chouinard <cousin17 at msu.edu> wrote:
>   
>> I'm having 2 issues with the rrdtool graph command.
>>
>> 1st I can't seem to get the new line command to work, this is what I
>> have in my code 'GPRINT:avgN:"Avg %6.2lf%%\n"', and when graphed the /n
>> gives a character that look like a box ,[], and I don't know how to deal
>> with this.
>>     
>
> In some languages you need to escape the \, so try \\n
>
>   
Yeah I tried that and then is displayed '\n' instead, is there a 
different command for new line? I also tried COMMENT: /n and that too 
didn't work!
>> 2nd I'm trying to comment the current date at the bottom of my graph but
>> am so far unsuccessful. I've tried  COMMENT:"%m/%d/%Y %H\:%M\:%S",  and
>> I tried declaring cur_date = '%m/%d/%Y %H\:%M\:%S' and then commenting
>> cur_date COMMENT:"' + cur_date + '" and neither are working for me.  I
>> get the following error:
>>
>>  Traceback (most recent call last):
>>  File "cpu_usage.py", line 78, in ?
>>  ' COMMENT:"' + cur_date + '"')
>> rrdtool.error: Could not make sense out of ' COMMENT:"%m/%d/%Y %H\:%M\:%S"'
>>     
>
> You need to get python to convert your datestring to a string, without
> % variables.
>   
How else would I do that? Python isn't complaining about the % variable, 
rrdtool is? I'm sorry I'm just confused.
 Thanks for your help!
>   
>> I'm probably missing something very basic (oh and I'm using python so
>> thats why everything is being passed as a string)
>>
>> Thanks for all your help so far, I've really appreciated it!!!
>>
>> _______________________________________________
>> rrd-users mailing list
>> rrd-users at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>>
>>     
>
>
>   



More information about the rrd-users mailing list