From owner-freebsd-questions@FreeBSD.ORG Wed Oct 29 09:04:58 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B16916A4CF for ; Wed, 29 Oct 2003 09:04:58 -0800 (PST) Received: from catseye.mine.nu (d154-5-164-0.bchsia.telus.net [154.5.164.0]) by mx1.FreeBSD.org (Postfix) with SMTP id 273FD43FA3 for ; Wed, 29 Oct 2003 09:04:57 -0800 (PST) (envelope-from catseye@catseye.mine.nu) Received: (qmail 74114 invoked by uid 1001); 29 Oct 2003 17:07:25 -0000 Date: Wed, 29 Oct 2003 09:07:25 -0800 From: Chris Pressey To: Matthew Seaman Message-Id: <20031029090725.7f0d10c0.cpressey@catseye.mine.nu> In-Reply-To: <20031029100015.GA21376@happy-idiot-talk.infracaninophile.co.uk> References: <000c01c39c3e$72c47950$fe01a8c0@JMICH> <20031027113545.GB11587@happy-idiot-talk.infracaninophile.co.uk> <1067418435.36829.690.camel@verdammt.falcotronic.net> <20031029100015.GA21376@happy-idiot-talk.infracaninophile.co.uk> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org cc: andi_payn@speedymail.org Subject: Re: Log every access to a file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2003 17:04:58 -0000 On Wed, 29 Oct 2003 10:00:15 +0000 Matthew Seaman wrote: > On Wed, Oct 29, 2003 at 01:07:26AM -0800, andi payn wrote: > > > The second is to use fam. I should mention that I've only used fam under > > linux, and, after a brief glance, it looks like the FreeBSD port > > (/usr/ports/devel/fam) is not as powerful--in particular, FreeBSD > > apparently doesn't provide imon support (a way for the filesystem to > > make a callback to a usermode app like fam--no dnotify or anything > > similar, either, apparently). Which implies that it's probably just a > > heavier-weight way of doing the exact same thing--periodically stat'ing > > a list of files--and that there is no better solution available. > > Check the kevent(2) man page. It's a generic mechanism for having the > kernel message your process when some condition occurs, such as > modification of a file. Unfortunately other than knowing something > happened, it doesn't tell you a great deal else, like who it was that > made the alteration. And for a way to easily use this facility from shell scripts, check out sysutils/wait_on, in the ports tree. -Chris