From owner-freebsd-fs@freebsd.org Mon Dec 25 17:41:25 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED087E9B4CA for ; Mon, 25 Dec 2017 17:41:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAD886C39E for ; Mon, 25 Dec 2017 17:41:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f179.google.com with SMTP id v186so30855946iod.7 for ; Mon, 25 Dec 2017 09:41:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=AUr5nH3+3Wly3mHZCWLcev8WCEiz9KG66/EoOq8Ruko=; b=DD6BQxfgZIWdE9VKi5spwdjM5saRoETNPNGcrlls+6Np/Dsj+MOT/CaOmhOpyOdvO8 C132Pc9j9AxWuwGTgX1Dy6yKu1xHwOQmXBW2jp7NHpH0zOOoWFpjwMds/kwMhAwwqY+X nJFY8xrzl0NOU5Y7J96UIgfBIDwQqfn8/SPHn7Gjv9rwxWbKW24IUjShRK9vlXfE75Cg 6w1DiTVorOG7A1tVTw2DHayWfDoZvKEx1ULht92kv/ufmdmmhxH+94x19pvTWsHrm0cZ F2uUs21B0Cc5BK2XXTCHooUjP2MEIZJGZLeDgDhx2SzbjAzlTT7HMb06vBzG1vCqYmb+ YosA== X-Gm-Message-State: AKGB3mLcqCxIr9Hd5sQPt0Hghvzd1NK6KBE2vVwEtWNyJ8md3jVqlYw9 BZDoF/j/qu03ymW9QG/6R12kqO3e X-Google-Smtp-Source: ACJfBouy+NyWzuZR7dAnbyTanRbtogatoJp6xdxPx8nMZ63pSj5XYMG6QQws/FfUka7dk4pZ2nwG2A== X-Received: by 10.107.137.146 with SMTP id t18mr17192199ioi.258.1514223679136; Mon, 25 Dec 2017 09:41:19 -0800 (PST) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id i63sm8646255itb.35.2017.12.25.09.41.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Dec 2017 09:41:19 -0800 (PST) Received: by mail-io0-f179.google.com with SMTP id t196so30838574iof.0 for ; Mon, 25 Dec 2017 09:41:19 -0800 (PST) X-Received: by 10.107.181.147 with SMTP id e141mr29521112iof.117.1514223678836; Mon, 25 Dec 2017 09:41:18 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.15.193 with HTTP; Mon, 25 Dec 2017 09:41:18 -0800 (PST) In-Reply-To: <9795fa64-b2dc-50c3-c7e0-8422e0388c15@aldan.algebra.com> References: <9795fa64-b2dc-50c3-c7e0-8422e0388c15@aldan.algebra.com> From: Conrad Meyer Date: Mon, 25 Dec 2017 09:41:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: kqueue/kevent - watching an entire filesystem? To: "Mikhail T." Cc: freebsd-fs Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 17:41:26 -0000 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. 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"