[rrd-users] RRDs::fetch() returns strange time values
A Darren Dunham
ddunham at taos.com
Thu Mar 20 07:01:58 CET 2008
On Tue, Mar 18, 2008 at 09:13:43AM +0100, Jens Rannacher wrote:
> Hello,
>
> I use RRDs::fetch(...) to read my rrd files. Everything works fine, but
> the returned "$time" and "$step" variables contain a strange time format.
Can you show an example? What version of rrdtool is installed?
> The $start variable consists of 18 digits, but although it doesn't seem to
> be a UNIX timestamp, the perl function localtime() can handle it.
>
> "$start % $step" returns me the start-time as UNIX timestamp minus one
> step. It's relly confusing. Perhaps someone can explain this to me?
I'm not sure what you mean. Can you show an example?
$ perl -le 'use RRDs; ($start,$step,$names,$data) = RRDs::fetch("test.rrd", "AVERAGE", "-s", "1000000000); print "$start $step";'
1000000800 3600
$
--
Darren Dunham ddunham at taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
More information about the rrd-users
mailing list