Code

collectd, plugin: Added support for "flush" callbacks.
authorSebastian Harl <sh@tokkee.org>
Tue, 26 Feb 2008 17:12:07 +0000 (18:12 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 27 Feb 2008 07:21:13 +0000 (08:21 +0100)
commitfb14e1f8ff0d3b7dddde1baa4a7a5b44532d27a4
tree477893839595540c3c2cc59b7eb2d122bff709b7
parent54ada5ddddb3692d8ec3493fbf4a5fd7aa39b5d1
collectd, plugin: Added support for "flush" callbacks.

A flush callback may be provided to make it possible to flush internal caches
(e.g. the rrdtool plugin's data cache) from outside the plugin. On SIGUSR1,
flush callback is invoked for all plugins. As flushing large amounts of data
might take some time a new thread is started to handle the request
asynchronously.

Thanks to Stefan Völkel for proposing this.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/collectd.c
src/plugin.c
src/plugin.h