[rrd-developers] Re: Patch to rrd_graph.c for printing only epoch time of a VDEF
    Alex van den Bogaerdt 
    alex at ergens.op.het.net
       
    Thu May 19 13:22:47 MEST 2005
    
    
  
On Thu, May 19, 2005 at 12:54:23PM +0200, Stefan Moser wrote:
> I've written a small patch for rrd_graph.c to be able to print the epoch time
> value instead of the ctime(3) formatted date string as is the default. I've
> chosen %t for the formatter string (strftime uses %s, but this might lead to
> confusion with the %s used for magnitude).
I don't think this is the way to go.  If we start using our own
characters, eventually we find ourselves in a situation where the
rest of the world will have started using the same characters but
with a different meaning.  Talk about confusion.
What about having either a new command (PRINTT or TPRINT) or having
a new escape sequence ('%_t' or '~t') ?
>   # rrdtool graph foo.png DEF:foo=foo.rrd:outOctets:AVERAGE \
>      VDEF:vfoo=foo,MAXIMUM PRINT:vfoo:'%lf'
>   0x0
>   90941.089605
>   # rrdtool graph foo.png DEF:foo=foo.rrd:outOctets:AVERAGE \
>      VDEF:vfoo=foo,MAXIMUM PRINT:vfoo:'%lf'
>   0x0
>   1116483600
That would be "PRINT:vfoo:'%t'", right ?
> BTW, does the documentation of the date/time formatters for the PRINT
> instruction (rrdgraph_graph.en.html) document features not implemented yet?
> It says there that all manner of time format strings are supported, but in
> reality, only %c works (which the code seems to confirm). Or am I just not
> getting it?
I'm afraid that's my fault.  I started coding and documenting a while
ago and had to take time off for personal reasons.  Most of that stuff
has been cleaned out, this has been overlooked.  Sorry.
Alex
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
    
    
More information about the rrd-developers
mailing list