[collectd] update_kstat re-initializes all plugins?

Brandon Hume hume-ml+collectd at bofh.ca
Mon Sep 24 19:06:04 CEST 2012


  I noticed that my collectd() was leaking file descriptors... it turns 
out that update_kstat calls the init functions for all plugins (via 
plugin_init_all()), and because of my local changes to ps_init() in 
processes.c - I'm using a local kstat handle - I'm causing the daemon to 
re-open the kstat handle each time.

It's easy enough to work around, and I should probably be using the 
kstat functions in common.c... but is this intentional?  I'd need to 
re-read the wiki, but is there mention that the registered init function 
could be re-called at any time?



More information about the collectd mailing list