[collectd] Collectd stops data collection after change in System time (towards the past time)

Sebastian Harl sh at tokkee.org
Sat May 29 19:25:09 CEST 2010


Hi Saurabh,

On Sat, May 29, 2010 at 05:22:12PM +0530, saurabh wrote:
> Scenario:
> I am starting collectd, and allow it to run for some time. After then
> I am changing system time (let say: changing time to 1 minutes : past),
> 
> collected then not collecting data for 1 minutes (may be for obvious
> reason !: )
> it again then starts reading values after next one minute laps.

Well, the problem is two-fold. First, RRDtool (which is used as "data
storage" in most cases) discards updates "in the past", i.e. if an
update arrives which is older than the previous update. This might or
might not be considered a reasonable behavior, but I guess the main
reason is that changing that would be fairly complicated (since old data
is consolidated).

Second, collectd checks for that as well. I suppose, this might be some
leftovers from the early days when collectd could write to RRDs only.
However, collectd does not discard that value (completely). It does not
add it to the global cache (which, e.g., is used by the "unixsock"
plugin) but it does send it to the write/output plugins. So., e.g., if
you're using the "csv" plugin (which probably does not make much sense,
though, in most cases), the data should be written out.

Unfortunately, we cannot do much about the behavior of RRDtool.

> What it seems to me is , if I start collected with 1 year advance date
> (future date),
> then after some time I correct time again , It will not collect data for
> One year ?!

collectd *will* collect data for that time but when writing to RRD
files, RRDtool will discard them.

> Could you please me point out the modules where such time logic is being
> accessed?
> If this is such problem, i will try to look in this.

As I said above, there's not much we can do about that (in collectd).
You could write to the RRDtool developers [1] and discuss the issue
there.

> As in various embedded systems, Systems may start with some defaults
> dates and , then
> many date corrections occurs during  life time, without system restart

What you should do in that case is to start collectd after initially
correcting the system time. Then, if you have any time-drifts later on,
you'll lose a few data points only, which, hopefully, should happen
rarely and, thus, not matter (that) much.

> (and so without any
> deamon restart :) )

A daemon restart won't help you either, since this is not caused by the
daemon.

HTH,
Sebastian

<1> <https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers>

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100529/81d88a09/attachment.pgp 


More information about the collectd mailing list