[rrd-users] rrdtool graph confusion

Emily Chouinard cousin17 at msu.edu
Wed Jul 2 14:08:38 CEST 2008


Thanks everyone for your help, I got it all under control. I just got 
rid of my " and used /l and that seemed to work just right. And the 
issue with the time was that I needed to declare the current date as 
cur_date = time.strftime('%m/%d/%Y %H\:%M\:%S', time.localtime()) and 
now everything is working fine, but thank you all for offering you 
suggestions I really appreciated it!

Yiannis Vavouranakis wrote:
>> 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"'
>   
>> I'm probably missing something very basic (oh and I'm using python so 
>> thats why everything is being passed as a string)
>>     
>
> Actually, I figured out what you're trying to do here. My guess is that the
> COMMENT does not understand sequences like %m/%d/%Y. Try the following:
> instead of saying cur_date = '%m/%d/%Y %H\:%M\:%S', declare cur_date as a
> datetime object, then use an appropriate string representation of it to
> concatenate with COMMENT. 
>
> Hope it helps.
>
> Regards,
> Yiannis Vavouranakis
>
> _______________________________________________
> 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