NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: filesystem change monitoring
On Tue, Aug 11, 2015 at 02:44:10PM +0000, Emmanuel Dreyfus wrote:
> Hello
>
> Do we have a smart way to monitor a whole filesystem hierarchy for
> changes? kqueue seems a good answer at a glance, but as far as I
> understand, I need to setup a filter for every single file and
> directory in the hierachy, and this can quickly hit kern.maxfiles.
> Of course kern.maxfiles can be increased, but that hints this solution
> may not scale very well.
>
> I also though about crawling on the hierarchy using FTS functions and
> look for ctime/mtime newer than previous crawl, but that can be CPU
> consuming.
>
> Any idea how this can be done efficiently?
Hmm, you might be out of luck. It seems that even people who have put a lot of
time (and code) into this question haven't come up with anything much better.
Take a look at the README of this GitHub repo I found:
https://github.com/emcrisostomo/fswatch
Seems like a cool project nevertheless.
-Christian
Home |
Main Index |
Thread Index |
Old Index