[collectd] [PATCH] - flush rrdtool cache to disk on SIGUSR1

bd at bc-bd.org bd at bc-bd.org
Tue Feb 26 12:03:44 CET 2008


Hi,

On Tue, Feb 26, 2008 at 10:35:44AM +0100, Florian Forster wrote:
> Hi,
> 
> On Tue, Feb 26, 2008 at 12:49:34AM +0100, bd at bc-bd.org wrote:
> > Extending the plugin api comes to my mind, eg
> > 
> > 	plugin_register_flush(...);
> > 
> > and catching USR1 in the main thread, then call _flush for all plugins.
> 
> I like this idea a lot.
> [...]

Great.

> > Or create a UNIX socket somewhere /tmp/collectd_flush which will
> > trigger rrdtool.c to write its data but we would need another thread
> > for that, though no signal handlers in the plugin.
> 
> I was more thinking along the lines of implementing a new command for
> the unixsock plugin which will cause the flush, too.

If the unixsock plugin already provides the needed infrastructure all
the better.

So we'd have two ways of flushing data, via USR1 and echo flush > ...

regards

	Stefan
-- 
giraffiti:
	Vandalism spray-painted very, very high.



More information about the collectd mailing list