NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

filesystem change monitoring



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?

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index