[rrd-users] extract timestamp from every sample

Steve Shipway s.shipway at auckland.ac.nz
Wed Jul 27 00:01:54 CEST 2011


RRDTool does not store the original timestamp.  Instead, it normalises the
data to regular 'time-buckets' according to the step size the RRD file was
created with.  If knowing the original timestamp exactly is important to
you, then RRDTool is not the correct backend database for you to be using.
If it is fine to know within the range of the step size (usually something
like a 5min window) then it is fine.

 

When you do an RRDFetch, you get the start time, the time step, and the
array of datapoints.  The first data point is at the start time, the next at
starttime+step, and so on.

 

Steve

 

  _____  

Steve Shipway

ITS Unix Services Design Lead

University of Auckland, New Zealand

Floor 1, 58 Symonds Street, Auckland

Phone: +64 (0)9 3737599 ext 86487

DDI: +64 (0)9 924 6487

Mobile: +64 (0)21 753 189

Email:  <mailto:s.shipway at auckland.ac.nz> s.shipway at auckland.ac.nz

P Please consider the environment before printing this e-mail 

 

 

From: rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch
[mailto:rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On
Behalf Of Fritjof Bornebusch - Skyfillers
Sent: Tuesday, 26 July 2011 10:28 p.m.
To: rrd-users at lists.oetiker.ch
Subject: [rrd-users] extract timestamp from every sample

 

Hi folks,

 

I have to get the timestamp from every sample which is in the data array:

 

info , ds_rrd , data = rrdtool.fetch( rrd_file, "AVERAGE", "--start",
str(start), "--end", str(end) )

 

How can I extract the timestamp?

 

I'm using the Python API.

 

Regards,

Fritjof

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20110726/30d8f876/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4928 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20110726/30d8f876/attachment-0001.bin 


More information about the rrd-users mailing list