On Wed, Dec 9, 2009 at 12:24,  <[email protected]> wrote:
> On Tue, 8 Dec 2009, Ryan Lynch wrote:
>
>> Obviously this isn't a low priority suggestion, but I think it could
>> be a pretty useful in managing large/complex Rsyslog configurations.
>>
>> On some of my Linux hosts, I have Rsyslog configured such that it can
>> easily hold 20-30 open files at any given time. (I'm using the utility
>> 'lsof', BTW, to list open files, like so: `lsof | gawk '$1 ~
>> "^rsyslogd$" && $9 ~ "^/var/log/"'`) Since I'm using dynamic templates
>> with date/time elements, the exact list of currently-open files
>> changes from minute to minute.
>
> you can find this information via lsof (or via /proc)
>
> this doesn't mean that querying rsyslog isn't better in the long run, just
> ways to deal with the problem in the mantime.

In theory, sure. In practice, well...

A single 'lsof' command is a pretty expensive operation--try running
`watch -n 1 'lsof >/dev/null'` for a minute, and then check your load
average. It has to do an enormous amount of work every time it runs.
Also, it will only provide a limited amount of information to an
unprivileged user. It'll tell you certain into, but it won't give you
the paths of the files that 'rsyslog' has open.

So 'lsof' can work for diagnostic purposes, but it isn't really
designed for this sort of thing.

-Ryan
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to