[collectd] Exporting the collectd's loop variable for plugins
Florian Forster
octo at verplant.org
Sun Nov 5 18:14:39 CET 2006
Hi Lubos,
On Sun, Nov 05, 2006 at 05:55:24PM +0100, Lubo?? Stan??k wrote:
> I have an idea to export the "loop" variable for a plugin quick check
> if we are quitting. It would speed up the SIGTERM & SIGINT handling.
I think it'd be nicer, to let the plugins register for a `shutdown'
event, if they want to clean up behind themselves. The
`plugin_register' function should be changed in the process, to allow
for a more generic interface. Something like this:
int plugin_register (char *name, int event, void *callback);
Where `callback' is either cast to `void (*) (void)' for `init', `read'
and `shutdown', or `void (*) (char *, char *, char *)' for `write'.
> I get "Exited normally" only in one half of the collectd's restarts.
> Probably only when the daemon does not do plugin_read_all().
Hm, that message should appear everytime collectd exists.. Are there any
errors or warnings in the syslog, if that message doesn't appear? I'll
try to reproduce this..
Regards,
-octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061105/09902584/attachment.pgp
More information about the collectd
mailing list