[syslog-ng] feature request?: monitor open logs for deletion/rename

Gergely Nagy algernon at balabit.hu
Thu Jul 12 12:20:48 CEST 2012


Sandor Geller <Sandor.Geller at morganstanley.com> writes:

> On Thu, Jul 12, 2012 at 11:40 AM, Gergely Nagy <algernon at balabit.hu> wrote:
>> Balazs Scheidler <bazsi77 at gmail.com> writes:
>>
>>> no need to use inotify for this. merely stating the file regularly
>>> should indicate the new file with a changed inode number.
>>
>> But inotify has the benefit of not needing regular polls, and immediate
>> notification when files change. I wouldn't want it for performance,
>> because it wouldn't give a noticable boost in this case. I like inotify
>> better in this case because of responsiveness, and effectiveness.
>
> inotify works only on local filesystems - so you'll either end up
> adding some complexity (syslog-ng needs to check that a given
> destination file is on a local fs or on a remote one) or should use an
> existing framework having FAM-like functionality. glib has gio for
> such purpose, right?

There are solutions for it, yes, and care should be taken to only use
inotify where it is appropriate - but where it is useful, it should be
used over polling.

However, I have not checked what glib has to offer, but I'm sure there's
multiple solutions out there to aid us in this quest.

-- 
|8]



More information about the syslog-ng mailing list