[rrd-users] Re: Setting Up Time

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Jun 9 11:28:48 MEST 2001


HurricaneIndy at aol.com wrote:

> A bit confused on this time thing. When filling the database up do you have 
> to use "epoch" time from 1970? I checked out the man page on rrdtool fetch 
> and it talked about how to specify AT-STYLE formatting. I would rather use 
> many of the other formats like 20010609 to specify date and time rather than 
> "epoch".

Look at rrdtool as a set of programs.  The update program, which is
used to store values into the database, needs the timestamp in the
epoch format.  As this is (usually) done from a program, it doesn't
really matter.  Perl knows how to provide this time, the GNU date
program knows how, if you're programming a front end in C, there are
functions to get it etcetera etcetera.

Two examples:
   bash $  date +%s

   perl -e 'use POSIX;print time();'

> But according to the documentation it says this:
> 
> The time when the graph should begin. Time in seconds since epoch 
> (1970-01-01) is required. 

For both fetch and graph, you can specify the time in a more human
readable form.  The time string can therefore be generated from
almost any source, such as a web form.

HTH,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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



More information about the rrd-users mailing list