Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 2017 09:41:18 -0800
From:      Conrad Meyer <cem@freebsd.org>
To:        "Mikhail T." <mi+thun@aldan.algebra.com>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: kqueue/kevent - watching an entire filesystem?
Message-ID:  <CAG6CVpVXdvVAC7up9QRkM-W_NX8KE=%2Bfj8QNhPyOoAE2oxvo=w@mail.gmail.com>
In-Reply-To: <9795fa64-b2dc-50c3-c7e0-8422e0388c15@aldan.algebra.com>
References:  <9795fa64-b2dc-50c3-c7e0-8422e0388c15@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
If you want to watch whole system activity (and not just a single
filesystem), that sounds like audit.  Or its crappy cousin,
filemon(4).  Of course, neither of these options has a kevent-style
interface, and filemon(4) in particular may miss relevant events.

I'm afraid there is nothing better than recursively opening
subdirectories to monitor a tree (even a whole filesystem) with
kqueue/kevent.

Best,
Conrad

On Mon, Dec 25, 2017 at 9:25 AM, Mikhail T. <mi+thun@aldan.algebra.com> wrote:
> It looks like an watching an arbitrary sub-tree with kqueue remains out of
> reach on FreeBSD -- one needs to traverse the entire (sub)tree first and
> create a separate kevent for each subdirectory.
>
> But, maybe, watching an entire filesystem for changes can be accomplished
> easier? If not just any filesystem -- a ZFS one?
>
> Thanks!
>
>    -mi
>
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVXdvVAC7up9QRkM-W_NX8KE=%2Bfj8QNhPyOoAE2oxvo=w>