[collectd] Unix Sock Plugin Issue

Sebastian Harl sh at tokkee.org
Fri Jul 31 12:14:45 CEST 2009


On Thu, Jul 30, 2009 at 08:17:40AM +0200, Florian Forster wrote:
> On Wed, Jul 29, 2009 at 12:51:47PM +0200, Andrés J. Díaz wrote:
> > I've the same problem. The easy workarround is deleted the socket
> > manually, I put in the launch script the line rm -f
> > /var/run/collectd-unixsock. The socket will be created again when
> > collectd restart.
> when shutting down the daemon, the `unixsock' plugin removes the socket
> file itself. The file is leftover, though, if the daemon crashes or
> doesn't shutdown correctly for some reason. In that case, please report
> this here with as much information as you can get.

Hrm ... we could let the 'unixsock' plugin check an already existing
socket file for a matching owner and group (possibly only if that is not
root.root) and whether it's an unused socket (is that possible somehow?)
and then, on successful match, remove the file on startup.

That does introduce some magic but this way it should be fairly save to
remove the file (remember: collectd runs as root in a lot of, possibly
most, cases).

Any thoughts on that?


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/20090731/6bd406a8/attachment.pgp 

More information about the collectd mailing list