[collectd] patch for email stats from postfix and amavisd-new, dns stats from powerdns

Sebastian Harl sh at tokkee.org
Sat Dec 8 19:56:06 CET 2007


On Sat, Dec 08, 2007 at 01:47:42PM +0100, Florian Forster wrote:
> On Mon, Dec 03, 2007 at 11:15:15AM -0800, Luke Heberling wrote:
> > > I like that idea. The utils_tail code could start a new thread which
> > > calls a callback with each new line read and the line reading, ...
> > >
> > Perhaps the thread creation could be an option, because in some cases 
> > such as mine, it's not really necessary.
> It makes it much easier though: The thread could leave the file
> descriptor open and call select(2) on it and check if the inode has
> changed every few seconds. On Linux `inotify' could be used for an
> intelligent alternative to polling. If someone feels up to it, maybe
> some FAM (file activity/alteration monitor) support could be added at
> some point, too.

Hum... select(2) is not a good idea in that case. If read(2) reaches EOF,
select(2) will return instantly on each call as "0" is available for reading.
This results in busy polling which obviously is not a good idea. inotify
sounds like a good solution to this but it's Linux specific. However, I'm
pretty sure there is some way to nicely solve this on other platforms as well.

As this sounds like a really interesting subject, I'm pretty sure I will come
up with something as soon as I have some time for it ;-)


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: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20071208/379abf16/attachment.pgp 

More information about the collectd mailing list